Skip to content

Commit

Permalink
Resolve remarks and Merge Conflict for PR.
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyTheSen committed Feb 11, 2020
1 parent ae287ba commit a2aefba
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 22 deletions.
26 changes: 11 additions & 15 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ Release date: TBA

Close #2874

* Do not allow ``python -m pylint ...`` to import user code

``python -m pylint ...`` adds the current working directory as the first element
of ``sys.path``. This opens up a potential security hole where ``pylint`` will import
user level code as long as that code resides in modules having the same name as stdlib
or pylint's own modules.

Close #3386

* Add `dummy-variables-rgx` option for `_redeclared-assigned-name` check.

Close #3341
Expand All @@ -21,8 +30,6 @@ Release date: TBA

Close #3284

* Clean up plugin HOWTO documentation.

* `not in` is considered iterating context for some of the Python 3 porting checkers.

* A new check `inconsistent-quotes` was added.
Expand Down Expand Up @@ -128,7 +135,6 @@ Release date: TBA

* ``inspect.getargvalues`` is no longer marked as deprecated.


* A new check ``f-string-without-interpolation`` was added

Close #3190
Expand All @@ -138,14 +144,14 @@ Release date: TBA
Close #3183

* ``docparams`` extension supports multiple types in raises sections.

Multiple types can also be separated by commas in all valid sections.

Closes #2729

* Allow parallel linting when run under Prospector

* Fixed false positives of ``method-hidden`` when a subclass defines
the method that is being hidden.
* Fixed false positives of ``method-hidden`` when a subclass defines the method that is being hidden.

Closes #414

Expand All @@ -155,10 +161,6 @@ Release date: TBA

Closes #2956

* Fixes a typo in tests/functional/t/ternary.py

Closes #3237

* Pass the actual PyLinter object to sub processes to allow using custom
PyLinter classes.

Expand All @@ -176,12 +178,6 @@ Release date: TBA
Pylint no longer outputs a traceback, if a file, read from stdin,
contains a syntaxerror.

* Clean up .travis.yml

Use up to date version of python interpreters

* Use new release of black 19.10b0 for formating

* Fix uppercase style to disallow 3+ uppercase followed by lowercase.

* Fixed ``undefined-variable`` and ``unused-import`` false positives
Expand Down
2 changes: 1 addition & 1 deletion doc/whatsnew/2.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ separated list of regexes, that if a name matches will be always marked as a bla

* Add a new check (non-str-assignment-to-dunder-name) to ensure that only strings are assigned to ``__name__`` attributes

* Add a new option ``notes-rgx`` to make fixme warnings more flexible
* Add a new option ``notes-rgx`` to make fixme warnings more flexible. Now either ``notes`` or ``notes-rgx`` option can be used to detect fixme warnings.
10 changes: 6 additions & 4 deletions pylint/checkers/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ class EncodingChecker(BaseChecker):
{
"type": "string",
"metavar": "<regexp>",
"default": ("a^"),
"help": "Regular expression of note tags to take in consideration.",
},
),
Expand All @@ -109,9 +108,12 @@ def open(self):
super().open()

notes = "|".join(map(re.escape, self.config.notes))
self._fixme_pattern = re.compile(
r"#\s*(%s|%s)\b" % (notes, self.config.notes_rgx), re.I
)
if self.config.notes_rgx:
regex_string = r"#\s*(%s|%s)\b" % (notes, self.config.notes_rgx)
else:
regex_string = r"#\s*(%s)\b" % (notes)

self._fixme_pattern = re.compile(regex_string, re.I)

def _check_encoding(self, lineno, line, file_encoding):
try:
Expand Down
2 changes: 0 additions & 2 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ logging-modules=logging
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,XXX,TODO

# Regular expression of note tags to take in consideration.
notes-rgx=a^

[SIMILARITIES]

Expand Down

0 comments on commit a2aefba

Please sign in to comment.