wemake-python-styleguide 1.2.0__tar.gz → 1.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/PKG-INFO +1 -1
  2. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/pyproject.toml +3 -2
  3. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/constants.py +5 -0
  4. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/options/config.py +4 -3
  5. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/options/defaults.py +2 -2
  6. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/presets/topics/complexity.py +0 -2
  7. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/violations/complexity.py +12 -6
  8. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/violations/naming.py +2 -0
  9. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/complexity/counts.py +11 -0
  10. wemake_python_styleguide-1.2.0/wemake_python_styleguide/visitors/ast/complexity/complex_finally.py +0 -34
  11. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/LICENSE +0 -0
  12. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/README.md +0 -0
  13. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/__init__.py +0 -0
  14. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/checker.py +0 -0
  15. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/cli/__init__.py +0 -0
  16. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/cli/cli_app.py +0 -0
  17. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/cli/commands/__init__.py +0 -0
  18. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/cli/commands/base.py +0 -0
  19. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/cli/commands/explain/__init__.py +0 -0
  20. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/cli/commands/explain/command.py +0 -0
  21. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/cli/commands/explain/message_formatter.py +0 -0
  22. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/cli/commands/explain/module_loader.py +0 -0
  23. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/cli/commands/explain/violation_loader.py +0 -0
  24. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/cli/output.py +0 -0
  25. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/compat/__init__.py +0 -0
  26. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/compat/aliases.py +0 -0
  27. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/compat/constants.py +0 -0
  28. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/compat/functions.py +0 -0
  29. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/compat/nodes.py +0 -0
  30. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/compat/packaging.py +0 -0
  31. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/compat/routing.py +0 -0
  32. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/compat/types.py +0 -0
  33. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/formatter.py +0 -0
  34. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/__init__.py +0 -0
  35. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/arguments/__init__.py +0 -0
  36. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/arguments/call_args.py +0 -0
  37. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/arguments/function_args.py +0 -0
  38. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/arguments/special_args.py +0 -0
  39. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/arguments/super_args.py +0 -0
  40. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/complexity/__init__.py +0 -0
  41. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/complexity/annotations.py +0 -0
  42. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/complexity/cognitive.py +0 -0
  43. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/complexity/functions.py +0 -0
  44. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/complexity/overuses.py +0 -0
  45. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/filenames.py +0 -0
  46. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/naming/__init__.py +0 -0
  47. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/naming/access.py +0 -0
  48. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/naming/alphabet.py +0 -0
  49. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/naming/blacklists.py +0 -0
  50. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/naming/builtins.py +0 -0
  51. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/naming/constants.py +0 -0
  52. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/naming/duplicates.py +0 -0
  53. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/naming/enums.py +0 -0
  54. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/naming/logical.py +0 -0
  55. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/naming/name_nodes.py +0 -0
  56. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/nodes.py +0 -0
  57. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/source.py +0 -0
  58. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/system.py +0 -0
  59. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tokens/__init__.py +0 -0
  60. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tokens/constants.py +0 -0
  61. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tokens/newlines.py +0 -0
  62. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tokens/numbers.py +0 -0
  63. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tokens/strings.py +0 -0
  64. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/__init__.py +0 -0
  65. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/annotations.py +0 -0
  66. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/attributes.py +0 -0
  67. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/bools.py +0 -0
  68. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/calls.py +0 -0
  69. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/classes.py +0 -0
  70. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/collections.py +0 -0
  71. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/compares.py +0 -0
  72. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/decorators.py +0 -0
  73. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/exceptions.py +0 -0
  74. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/functions.py +0 -0
  75. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/getters_setters.py +0 -0
  76. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/ifs.py +0 -0
  77. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/imports.py +0 -0
  78. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/keywords.py +0 -0
  79. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/loops.py +0 -0
  80. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/operators.py +0 -0
  81. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/pattern_matching.py +0 -0
  82. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/recursion.py +0 -0
  83. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/slices.py +0 -0
  84. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/strings.py +0 -0
  85. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/stubs.py +0 -0
  86. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/tree/variables.py +0 -0
  87. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/walk.py +0 -0
  88. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/logic/walrus.py +0 -0
  89. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/options/__init__.py +0 -0
  90. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/options/validation.py +0 -0
  91. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/presets/__init__.py +0 -0
  92. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/presets/topics/__init__.py +0 -0
  93. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/presets/topics/classes.py +0 -0
  94. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/presets/topics/naming.py +0 -0
  95. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/presets/types/__init__.py +0 -0
  96. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/presets/types/file_tokens.py +0 -0
  97. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/presets/types/filename.py +0 -0
  98. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/presets/types/tree.py +0 -0
  99. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/py.typed +0 -0
  100. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/transformations/__init__.py +0 -0
  101. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/transformations/ast/__init__.py +0 -0
  102. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/transformations/ast/enhancements.py +0 -0
  103. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/transformations/ast_tree.py +0 -0
  104. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/types.py +0 -0
  105. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/version.py +0 -0
  106. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/violations/__init__.py +0 -0
  107. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/violations/base.py +0 -0
  108. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/violations/best_practices.py +0 -0
  109. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/violations/consistency.py +0 -0
  110. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/violations/oop.py +0 -0
  111. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/violations/refactoring.py +0 -0
  112. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/violations/system.py +0 -0
  113. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/__init__.py +0 -0
  114. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/__init__.py +0 -0
  115. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/blocks.py +0 -0
  116. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/builtins.py +0 -0
  117. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/classes/__init__.py +0 -0
  118. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/classes/attributes.py +0 -0
  119. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/classes/classdef.py +0 -0
  120. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/classes/methods.py +0 -0
  121. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/compares.py +0 -0
  122. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/complexity/__init__.py +0 -0
  123. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/complexity/access.py +0 -0
  124. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/complexity/annotations.py +0 -0
  125. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/complexity/calls.py +0 -0
  126. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/complexity/classes.py +0 -0
  127. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/complexity/function.py +0 -0
  128. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/complexity/imports.py +0 -0
  129. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/complexity/jones.py +0 -0
  130. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/complexity/nested.py +0 -0
  131. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/complexity/offset.py +0 -0
  132. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/complexity/overuses.py +0 -0
  133. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/complexity/pm.py +0 -0
  134. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/conditions.py +0 -0
  135. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/decorators.py +0 -0
  136. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/exceptions.py +0 -0
  137. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/functions.py +0 -0
  138. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/imports.py +0 -0
  139. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/iterables.py +0 -0
  140. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/keywords.py +0 -0
  141. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/loops.py +0 -0
  142. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/modules.py +0 -0
  143. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/naming/__init__.py +0 -0
  144. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/naming/validation.py +0 -0
  145. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/naming/variables.py +0 -0
  146. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/operators.py +0 -0
  147. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/pm.py +0 -0
  148. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/redundancy.py +0 -0
  149. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/statements.py +0 -0
  150. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/ast/subscripts.py +0 -0
  151. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/base.py +0 -0
  152. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/decorators.py +0 -0
  153. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/filenames/__init__.py +0 -0
  154. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/filenames/module.py +0 -0
  155. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/tokenize/__init__.py +0 -0
  156. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/tokenize/comments.py +0 -0
  157. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/tokenize/conditions.py +0 -0
  158. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/tokenize/functions.py +0 -0
  159. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/tokenize/primitives.py +0 -0
  160. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/tokenize/statements.py +0 -0
  161. {wemake_python_styleguide-1.2.0 → wemake_python_styleguide-1.3.0}/wemake_python_styleguide/visitors/tokenize/syntax.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: wemake-python-styleguide
3
- Version: 1.2.0
3
+ Version: 1.3.0
4
4
  Summary: The strictest and most opinionated python linter ever
5
5
  License: MIT
6
6
  Keywords: flake8,flake8-plugin,flake8-formatter,linter,wemake.services,styleguide,code quality,pycqa
@@ -4,7 +4,7 @@ requires = [ "poetry-core>=2.0" ]
4
4
 
5
5
  [project]
6
6
  name = "wemake-python-styleguide"
7
- version = "1.2.0"
7
+ version = "1.3.0"
8
8
  description = "The strictest and most opinionated python linter ever"
9
9
 
10
10
  license = {text = "MIT"}
@@ -180,7 +180,8 @@ ignore = [
180
180
  external = [ "WPS" ]
181
181
 
182
182
  # Plugin configs:
183
- flake8-import-conventions.banned-from = [ "ast" ]
183
+ flake8-import-conventions.banned-from = [ "ast", "datetime" ]
184
+ flake8-import-conventions.aliases = { datetime = "dt" }
184
185
  flake8-quotes.inline-quotes = "single"
185
186
  mccabe.max-complexity = 6
186
187
  pydocstyle.convention = "google"
@@ -124,6 +124,7 @@ VARIABLE_NAMES_BLACKLIST: Final = frozenset(
124
124
  'param',
125
125
  'params',
126
126
  'parameters',
127
+ 'arr',
127
128
  # Confusables:
128
129
  'no',
129
130
  'true',
@@ -132,6 +133,10 @@ VARIABLE_NAMES_BLACKLIST: Final = frozenset(
132
133
  'foo',
133
134
  'bar',
134
135
  'baz',
136
+ 'spam',
137
+ 'ham',
138
+ 'tmp',
139
+ 'temp',
135
140
  ),
136
141
  )
137
142
 
@@ -152,10 +152,11 @@ You can also show all options that ``flake8`` supports by running:
152
152
  - ``max-match-subjects`` - maximum number of subjects in a match statement,
153
153
  defaults to
154
154
  :str:`wemake_python_styleguide.options.defaults.MAX_MATCH_SUBJECTS`
155
- - ``max-match-cases`` - maximum number of cases in a match block of code
155
+ - ``max-match-cases`` - maximum number of cases in a match block of code,
156
156
  defaults to
157
157
  :str:`wemake_python_styleguide.options.defaults.MAX_MATCH_CASES`
158
- - ``max-lines-in-finally`` - maximum lines in finally block of code
158
+ - ``max-lines-in-finally`` - maximum amount of finally block body length.
159
+ Lines equal to statements.
159
160
  defaults to
160
161
  :str:`wemake_python_styleguide.options.defaults.MAX_LINES_IN_FINALLY`
161
162
 
@@ -437,7 +438,7 @@ class Configuration:
437
438
  _Option(
438
439
  '--max-lines-in-finally',
439
440
  defaults.MAX_LINES_IN_FINALLY,
440
- 'Maximum lines of expressions in a finally block.',
441
+ 'Maximum amount of finally block body length.',
441
442
  ),
442
443
  # Formatter:
443
444
  _Option(
@@ -56,8 +56,8 @@ FORBIDDEN_MODULE_METADATA: Final = ()
56
56
  # Complexity:
57
57
  # ===========
58
58
 
59
- #: Maximum lines of expressions in a `finally` block.
60
- MAX_LINES_IN_FINALLY: Final = 2 # guessed
59
+ #: Maximum amount of `finally` block body length.
60
+ MAX_LINES_IN_FINALLY: Final = 2 # best practice
61
61
 
62
62
  #: Maximum number of `return` statements allowed in a single function.
63
63
  MAX_RETURNS: Final = 5 # 7-2
@@ -5,7 +5,6 @@ from wemake_python_styleguide.visitors.ast.complexity import ( # noqa: WPS235
5
5
  annotations,
6
6
  calls,
7
7
  classes,
8
- complex_finally,
9
8
  counts,
10
9
  function,
11
10
  imports,
@@ -40,5 +39,4 @@ PRESET: Final = (
40
39
  annotations.AnnotationComplexityVisitor,
41
40
  pm.MatchSubjectsVisitor,
42
41
  pm.MatchCasesVisitor,
43
- complex_finally.ComplexFinallyBlocksVisitor,
44
42
  )
@@ -63,7 +63,7 @@ Summary
63
63
  TooManyTypeParamsViolation
64
64
  TooManyMatchSubjectsViolation
65
65
  TooManyMatchCaseViolation
66
- ComplexFinallyViolation
66
+ TooLongFinallyBodyViolation
67
67
 
68
68
  Module complexity
69
69
  -----------------
@@ -110,7 +110,7 @@ Structure complexity
110
110
  .. autoclass:: TooManyTypeParamsViolation
111
111
  .. autoclass:: TooManyMatchSubjectsViolation
112
112
  .. autoclass:: TooManyMatchCaseViolation
113
- .. autoclass:: ComplexFinallyViolation
113
+ .. autoclass:: TooLongFinallyBodyViolation
114
114
 
115
115
  """
116
116
 
@@ -1402,9 +1402,9 @@ class TooManyMatchCaseViolation(ASTViolation):
1402
1402
 
1403
1403
 
1404
1404
  @final
1405
- class ComplexFinallyViolation(ASTViolation):
1405
+ class TooLongFinallyBodyViolation(ASTViolation):
1406
1406
  """
1407
- Forbids complex ``finally`` block.
1407
+ Forbid ``finally`` blocks with bodies that are too long.
1408
1408
 
1409
1409
  Reasoning:
1410
1410
  ``finally`` is very special. It executes code in all
@@ -1412,10 +1412,14 @@ class ComplexFinallyViolation(ASTViolation):
1412
1412
  it indicates a larger problem: brittle and complex cleanups.
1413
1413
 
1414
1414
  Solution:
1415
- Simplify the ``finally`` block. Use context managers, use ``ExitStack``.
1415
+ Move things out of the ``finally`` block or create new functions.
1416
+ The fewer lines you have in your ``finally`` block -
1417
+ the safer you are from accidental errors.
1418
+ Use context managers, use ``ExitStack``.
1416
1419
 
1417
1420
  Configuration:
1418
1421
  This rule is configurable with ``--max-lines-in-finally``.
1422
+ Lines equal to statements.
1419
1423
  Default:
1420
1424
  :str:`wemake_python_styleguide.options.defaults.MAX_LINES_IN_FINALLY`
1421
1425
 
@@ -1423,8 +1427,10 @@ class ComplexFinallyViolation(ASTViolation):
1423
1427
  https://peps.python.org/pep-0765
1424
1428
 
1425
1429
  .. versionadded:: 1.2.0
1430
+ .. versionchanged:: 1.3.0
1431
+ Now we count statements in ``finally``, not physical lines.
1426
1432
 
1427
1433
  """
1428
1434
 
1429
- error_template = 'Found too many lines in `finally` block: {0}'
1435
+ error_template = 'Found too long `finally` block: {0}'
1430
1436
  code = 243
@@ -327,6 +327,8 @@ class WrongVariableNameViolation(ASTViolation):
327
327
  :py:data:`~wemake_python_styleguide.constants.VARIABLE_NAMES_BLACKLIST`.
328
328
 
329
329
  .. versionadded:: 0.1.0
330
+ .. versionchanged:: 1.3.0
331
+ Added more names: ``spam``, ``ham``, ``tmp``, ``temp``, ``arr``
330
332
 
331
333
  """
332
334
 
@@ -191,6 +191,7 @@ class TryExceptVisitor(BaseNodeVisitor):
191
191
  """Ensures that try/except is correct."""
192
192
  self._check_except_count(node)
193
193
  self._check_try_body_length(node)
194
+ self._check_finally_body_length(node)
194
195
  self._check_exceptions_count(node)
195
196
  self.generic_visit(node)
196
197
 
@@ -214,6 +215,16 @@ class TryExceptVisitor(BaseNodeVisitor):
214
215
  ),
215
216
  )
216
217
 
218
+ def _check_finally_body_length(self, node: AnyTry) -> None:
219
+ if len(node.finalbody) > self.options.max_lines_in_finally:
220
+ self.add_violation(
221
+ complexity.TooLongFinallyBodyViolation(
222
+ node,
223
+ text=str(len(node.finalbody)),
224
+ baseline=self.options.max_lines_in_finally,
225
+ ),
226
+ )
227
+
217
228
  def _check_exceptions_count(self, node: AnyTry) -> None:
218
229
  for except_handler in node.handlers:
219
230
  exc_type = except_handler.type
@@ -1,34 +0,0 @@
1
- import ast
2
- from typing import final
3
-
4
- from wemake_python_styleguide.violations import complexity
5
- from wemake_python_styleguide.visitors.base import BaseNodeVisitor
6
-
7
-
8
- @final
9
- class ComplexFinallyBlocksVisitor(BaseNodeVisitor):
10
- """Ensures there are no complex ``finally`` blocks."""
11
-
12
- def visit_Try(self, node: ast.Try) -> None:
13
- """Visits all finally nodes in the tree."""
14
- self._check_complex_finally(node)
15
- self.generic_visit(node)
16
-
17
- def _check_complex_finally(self, node: ast.Try) -> None:
18
- """Checks complexity of finally blocks."""
19
- if not node.finalbody:
20
- return
21
-
22
- first_line = node.finalbody[0].lineno
23
- # `end_lineno` was added in 3.8, but typing is not really correct,
24
- # we are pretty sure that it always exist in modern python versions.
25
- last_line = getattr(node.finalbody[-1], 'end_lineno', 0) or 0
26
- total_lines = last_line - first_line + 1
27
- if total_lines > self.options.max_lines_in_finally:
28
- self.add_violation(
29
- complexity.ComplexFinallyViolation(
30
- node,
31
- text=str(total_lines),
32
- baseline=self.options.max_lines_in_finally,
33
- ),
34
- )