Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reducing the number of dependencies #1139

Closed
sobolevn opened this issue Feb 5, 2020 · 2 comments
Closed

Reducing the number of dependencies #1139

sobolevn opened this issue Feb 5, 2020 · 2 comments
Assignees
Labels
dependencies Pull requests that update a dependency file feature New feature or request level:advanced Needs a lot of care question Further information is requested

Comments

@sobolevn
Copy link
Member

sobolevn commented Feb 5, 2020

Currently our linter has lots of dependencies.
There are several types of them:

  1. Fundamental, like flake8. Without these packages our linter won't work at all
  2. Important, like typing_extensions, pygments, pep8-naming, flake8-bugbear, flake8-isort, and several others. Which give awesome features and increases the final quality be a large margin
  3. Single-featurish and complex, like flake8-commas, flake8-quotes, flake8-builtins. Which give us an awesome single feature, but is too complex to recreate
  4. Single-featurish and simple, like flake8-print, flake8-debugger, flake8-annotations-complexity, cognitive_complexity, flake8-pep3101. Which give us an awesome single feature, but is fairly simple to recreate

I suggest to drop all possible group 4 dependencies and recreate their logic inside the core product. Why?

Because they are harder to manage in the long run. See #1138 for more details.

Downsides:

  • error code change for our users
  • extra code to maintain
  • more tests to write
  • unpredictable effects on performance

I hope this makes sense.

@sobolevn sobolevn added feature New feature or request question Further information is requested dependencies Pull requests that update a dependency file level:advanced Needs a lot of care labels Feb 5, 2020
@sobolevn sobolevn added this to the Version 0.14 aka python3.8 milestone Feb 5, 2020
@sobolevn
Copy link
Member Author

sobolevn commented Feb 5, 2020

Can be dropped for python3.8:

  • typing_extensions (we still require it for python<3.8)

Can be dropped after libcst integration:

  • flake8-broken-line

Can be dropped after python3.9:

  • astor

@sobolevn
Copy link
Member Author

This can be now closed. Track individual issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file feature New feature or request level:advanced Needs a lot of care question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant