[MediaWiki-commits] [Gerrit] pywikibot/core[master]: formatter.py: remove unused 'inspect'

2017-05-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/356087 )

Change subject: formatter.py: remove unused 'inspect'
..


formatter.py: remove unused 'inspect'

Remove unused inspect.stack().

Bug: T166484
Change-Id: I7b2921d2406882736b0072b18d5562fbcac3f366
---
M pywikibot/tools/formatter.py
1 file changed, 1 insertion(+), 7 deletions(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/tools/formatter.py b/pywikibot/tools/formatter.py
index 94a4d95..149454b 100644
--- a/pywikibot/tools/formatter.py
+++ b/pywikibot/tools/formatter.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """Module containing various formatting related utilities."""
 #
-# (C) Pywikibot team, 2015-2016
+# (C) Pywikibot team, 2015-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -9,7 +9,6 @@
 
 __version__ = '$Id$'
 
-import inspect
 import math
 
 from string import Formatter
@@ -71,11 +70,6 @@
 # Dot.product of colors to create all possible combinations of foreground
 # and background colors.
 colors |= set('%s;%s' % (c1, c2) for c1 in colors for c2 in colors)
-
-def __init__(self):
-"""Create new instance and store the stack depth."""
-super(_ColorFormatter, self).__init__()
-self._depth = len(inspect.stack())
 
 def get_value(self, key, args, kwargs):
 """Get value, filling in 'color' when it is a valid color."""

-- 
To view, visit https://gerrit.wikimedia.org/r/356087
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7b2921d2406882736b0072b18d5562fbcac3f366
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: formatter.py: remove unused 'inspect'

2017-05-29 Thread Mpaa (Code Review)
Mpaa has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/356087 )

Change subject: formatter.py: remove unused 'inspect'
..

formatter.py: remove unused 'inspect'

Remove unused inspect.stack().

Bug: T166484
Change-Id: I7b2921d2406882736b0072b18d5562fbcac3f366
---
M pywikibot/tools/formatter.py
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/87/356087/1

diff --git a/pywikibot/tools/formatter.py b/pywikibot/tools/formatter.py
index 94a4d95..0728980 100644
--- a/pywikibot/tools/formatter.py
+++ b/pywikibot/tools/formatter.py
@@ -9,7 +9,6 @@
 
 __version__ = '$Id$'
 
-import inspect
 import math
 
 from string import Formatter
@@ -75,7 +74,6 @@
 def __init__(self):
 """Create new instance and store the stack depth."""
 super(_ColorFormatter, self).__init__()
-self._depth = len(inspect.stack())
 
 def get_value(self, key, args, kwargs):
 """Get value, filling in 'color' when it is a valid color."""

-- 
To view, visit https://gerrit.wikimedia.org/r/356087
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b2921d2406882736b0072b18d5562fbcac3f366
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits