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

BEHAVIOR: remove flake8, isort, pydocstyle, and pylint #145

Merged
merged 10 commits into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@
"*particle*.*ml",
".constraints/*.txt",
".editorconfig",
".flake8*",
".gitignore",
".gitpod.*",
".mypy.ini",
".pre-commit-config.yaml",
".prettierignore",
".pydocstyle*",
".pylintrc",
".readthedocs.yml",
".vscode/*",
".vscode/.gitignore",
Expand Down Expand Up @@ -81,7 +78,6 @@
"conda",
"fromdict",
"indentless",
"isort",
"linkcheck",
"maxsplit",
"nargs",
Expand All @@ -97,8 +93,6 @@
"prereleased",
"prettierignore",
"prettierrc",
"pydocstyle",
"pylint",
"pyright",
"pyupgrade",
"redeboer",
Expand Down
56 changes: 0 additions & 56 deletions .flake8

This file was deleted.

4 changes: 1 addition & 3 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ vscode:
- eamodio.gitlens
- editorconfig.editorconfig
- esbenp.prettier-vscode
- garaioag.garaio-vscode-unwanted-recommendations
- github.vscode-github-actions
- github.vscode-pull-request-github
- ms-python.flake8
- ms-python.isort
- ms-python.pylint
- ms-python.python
- ms-python.vscode-pylance
- ms-vsliveshare.vsliveshare
Expand Down
39 changes: 0 additions & 39 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ ci:
autoupdate_schedule: quarterly
skip:
- check-dev-files
- flake8
- format-setup-cfg
- mypy
- pylint
- pyright
- repoma-self-check
- taplo
Expand Down Expand Up @@ -62,11 +60,6 @@ repos:
language: python
files: ^\.pre\-commit\-(config|hooks)\.yaml$

- repo: https://github.com/PyCQA/autoflake
rev: v2.1.1
hooks:
- id: autoflake

- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
Expand All @@ -93,20 +86,6 @@ repos:
.*\.py
)$

- repo: local
hooks:
- id: flake8
name: flake8
entry: flake8
language: system
types:
- python

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.34.0
hooks:
Expand All @@ -127,24 +106,6 @@ repos:
hooks:
- id: prettier

- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle

- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
args:
- --rcfile=.pylintrc
- --score=no
language: system
require_serial: true
types:
- python

- repo: https://github.com/ComPWA/mirrors-pyright
rev: v1.1.307
hooks:
Expand Down
11 changes: 0 additions & 11 deletions .pydocstyle

This file was deleted.

31 changes: 0 additions & 31 deletions .pylintrc

This file was deleted.

11 changes: 8 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
"eamodio.gitlens",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"garaioag.garaio-vscode-unwanted-recommendations",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"ms-python.flake8",
"ms-python.isort",
"ms-python.pylint",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-vsliveshare.vsliveshare",
Expand All @@ -21,5 +19,12 @@
"tamasfe.even-better-toml",
"tyriar.sort-lines",
"yzhang.markdown-all-in-one"
],
"unwantedRecommendations": [
"bungcip.better-toml",
"ms-python.flake8",
"ms-python.isort",
"ms-python.pylint",
"travisillig.vscode-json-stable-stringify"
]
}
7 changes: 1 addition & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,8 @@
"**/.git/**": true,
"**/.tox/**": true
},
"flake8.importStrategy": "fromEnvironment",
"git.rebaseWhenSync": true,
"github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"],
"isort.check": true,
"isort.importStrategy": "fromEnvironment",
"pylint.importStrategy": "fromEnvironment",
"python.analysis.autoImportCompletions": false,
"python.analysis.diagnosticMode": "workspace",
"python.analysis.inlayHints.pytestParameters": true,
Expand All @@ -51,7 +47,7 @@
"python.linting.enabled": true,
"python.linting.flake8Enabled": false,
"python.linting.mypyEnabled": true,
"python.linting.pydocstyleEnabled": true,
"python.linting.pydocstyleEnabled": false,
"python.linting.pylamaEnabled": false,
"python.linting.pylintEnabled": false,
"python.testing.pytestArgs": ["--color=no", "--no-cov", "-vv"],
Expand All @@ -62,7 +58,6 @@
"ruff.organizeImports": true,
"search.exclude": {
"**/tests/**/__init__.py": true,
"*/.pydocstyle": true,
".constraints/*.txt": true,
".github/workflows/cd.yml": true,
".github/workflows/ci.yml": true,
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ComPWA/repo-maintenance/main.svg)](https://results.pre-commit.ci/latest/github/ComPWA/repo-maintenance/main)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

This repository is to standardize the developer environment of Python packages by the
Expand Down
11 changes: 0 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ target-version = [
"py39",
]

[tool.isort]
profile = "black"
src_paths = [
"src",
"tests",
]

[tool.ruff]
extend-select = [
"A",
Expand Down Expand Up @@ -72,10 +65,6 @@ extend-select = [
"UP",
"YTT",
]
external = [
"D100",
"R701",
]
ignore = [
"D101", # class docstring
"D102", # method docstring
Expand Down
16 changes: 0 additions & 16 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,13 @@ test =
pytest-xdist
format =
black
isort
flake8 =
flake8 >=4 # extend-select
flake8-blind-except
flake8-bugbear
flake8-builtins
flake8-comprehensions
flake8-future-import
flake8-pytest-style
flake8-rst-docstrings
flake8-type-ignore; python_version >="3.8.0"
flake8-use-fstring
pep8-naming
mypy =
mypy
types-PyYAML
types-setuptools
types-toml
lint =
%(flake8)s
%(mypy)s
pydocstyle
pylint >=2.5 # good-names-rgxs
radon
ruff
sty =
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# noqa: D100
from setuptools import setup

setup(
Expand Down
6 changes: 3 additions & 3 deletions src/repoma/check_dev_files/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
import sys
from typing import List, Optional, Sequence

from repoma.check_dev_files.deprecated import remove_deprecated_tools
from repoma.utilities.executor import Executor

from . import (
black,
commitlint,
cspell,
editorconfig,
flake8,
github_labels,
github_templates,
github_workflows,
Expand Down Expand Up @@ -162,11 +162,9 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
)
executor(nbstripout.main)
executor(toml.main) # has to run before pre-commit
executor(precommit.main)
executor(prettier.main, args.no_prettierrc)
if is_python_repo:
executor(black.main)
executor(flake8.main)
executor(release_drafter.main, args.repo_name, args.repo_title)
if args.pin_requirements != "no":
executor(
Expand All @@ -177,6 +175,8 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
executor(ruff.main)
executor(setup_cfg.main, args.ignore_author)
executor(tox.main)
executor(precommit.main)
executor(remove_deprecated_tools)
executor(vscode.main)
if not args.no_gitpod:
executor(gitpod.main)
Expand Down
1 change: 0 additions & 1 deletion src/repoma/check_dev_files/cspell.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
__VSCODE_EXTENSION_NAME = "streetsidesoftware.code-spell-checker"

# cspell:ignore pelling
# pylint: disable=line-too-long
# fmt: off
__BADGE = (
"[![Spelling"
Expand Down
Loading