Commit Graph

20 Commits

Author SHA1 Message Date
Pierre Sassoulas
d3fd7f0f52 Create a DEFAULT_PYLINT_HOME constant and upgrade help text 2021-10-26 06:48:45 +02:00
Marc Mueller
48fbea4656
Use py-version for alternative union syntax check (#5160) 2021-10-15 20:53:22 +02:00
Pierre Sassoulas
d8069ddc9f
`astroid.const.BUILTINS` use removed for clarity and so astroid can also removes it later (#4868)
* Simplify the way builtins is used (remove astroid dependencies)

* Replace the constant BUILTINS by the string 'builtins'

This make for clearer and also slightly faster code (means time
seems to decrease by 0.68% with this change alone (astroid/pylint)
in the pylint tests benchmarks). Done because we were using an
import from astroid from astroid.bases for one of those, which is
kinda messy.
2021-08-19 09:06:12 +02:00
Pierre Sassoulas
f0adf60bc1 Create a constant for BUILTINS 2021-07-06 08:52:20 +02:00
Marc Mueller
21290866a2
Fix copyright links (#4647)
* Fix link in license header
* Update link to astroid bump_changelog
2021-07-01 12:47:58 +02:00
Sergei Lebedev
3d6389b97e
VariableChecker now accounts for attribute lookups in type comments (#4604)
* VariableChecker now accounts for attribute lookups in type comments

Prior to this commit VariableChecker did not recurse into attribute lookups
in type comments. This lead to false positive unused-import messages in e.g.

    import collections
    d = ...  # type: collections.OrderedDict

Fixes #4603
2021-06-27 20:11:54 +02:00
Pierre Sassoulas
af52033971
Rename copying to license and upgrade the setup.cfg (#4338) 2021-04-11 15:29:34 +02:00
Pierre Sassoulas
29bc551a94 Move informations that never change in the setup.py 2021-04-05 15:08:27 +02:00
Pierre Sassoulas
14f20e2d50 Import astroid with import x or from x import y but not both
Remove unused imports for astroid
2021-03-28 16:30:10 +02:00
Marc Mueller
5d5f657278 Improve handling of assignment expressions 2021-03-26 22:01:46 +01:00
Pierre Sassoulas
ee910755b9 Migrate from % syntax or bad format() syntax to fstring
We can do that in python 3.6
2021-02-21 15:36:16 +01:00
Pierre Sassoulas
5bed07eba9 Move from % string formatting syntax to f-string or .format() 2021-02-21 15:36:16 +01:00
Pierre Sassoulas
8e5660ccd9 Create a constant for version check and refactor existing one 2021-01-24 10:16:38 +01:00
wtracy
c15d3f0612 Remove unused regular expressions import. 2020-10-03 10:51:17 -07:00
wtracy
07d8504c38 OPTION_RGX is redefined in pragma_parser.py, and is not used anywhere else. Removing this declaration, as it serves no purpose. 2020-10-02 15:51:41 -07:00
Pierre Sassoulas
7831157f47 The full version is a constant we can just import it 2020-05-10 11:02:10 +02:00
Anthony Sottile
a45505143f pyupgrade: automated removal of python2 constructs
using configuration:

```yaml
-   repo: https://github.com/asottile/pyupgrade
    rev: v2.1.0
    hooks:
    -   id: pyupgrade
        args: [--py3-plus, --keep-percent-format]
        exclude: ^tests/(extensions/data/|functional/|input/|regrtest_data/)
```
2020-03-24 10:27:21 +01:00
Pierre Sassoulas
748bb0b60f Doc - Retrocompatibility with the main checker name 2019-06-20 14:09:59 +02:00
Pierre Sassoulas
8a09f2dda7 Refactor - Use a constant for the main checker name
Following review see : https://github.com/PyCQA/pylint/pull/2844#discussion_r281014968
2019-06-20 14:09:59 +02:00
Pierre Sassoulas
1dbbb35d93 Refactor - Avoid intra-packages circular dependencies for constants
Some constants were package internal but were used by multiple
packages. This created circular dependencies. By creating a
file for constants we make sure this does not happen because
we won't import everything important in this file and every
thing else can depend on it.
2019-03-29 09:37:05 +01:00