Skip to content

Commit

Permalink
Migrate to pyproject.toml (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Sep 17, 2022
1 parent a5213fb commit 9912a2e
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 46 deletions.
3 changes: 3 additions & 0 deletions .flake8
@@ -0,0 +1,3 @@
[flake8]
ignore = E203,W503
max-line-length = 88
4 changes: 3 additions & 1 deletion .github/workflows/main.yaml
Expand Up @@ -33,8 +33,10 @@ jobs:

- run: pip install .

- run: pip install pytest

- name: run tests
run: python setup.py test
run: pytest

lint:
name: pre-commit
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Expand Up @@ -42,7 +42,7 @@ repos:
hooks:
- id: black

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.0.0
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.10.1
hooks:
- id: setup-cfg-fmt
- id: validate-pyproject
50 changes: 50 additions & 0 deletions pyproject.toml
@@ -0,0 +1,50 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[project]
name = "autoflake"
description = "Removes unused imports and unused variables"
license = {text = "MIT"}
classifiers = [
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Quality Assurance",
]
keywords = ["clean", "fix", "automatic", "unused", "import"]
urls = {Homepage = "https://www.github.com/PyCQA/autoflake"}
requires-python = ">=3.7"
dependencies = [
"pyflakes>=1.1.0",
"tomli>=2.0.1;python_version<'3.11'",
]
dynamic = ["version"]

[project.readme]
file = "README.md"
content-type = "text/markdown"

[project.scripts]
autoflake = "autoflake:main"

[tool.setuptools]
py-modules = ["autoflake"]
# test-suite = "test_autoflake" # Deprecated since setuptools v41.5.0
license-files = ["LICENSE"]
include-package-data = false

[tool.setuptools.packages]
find = {namespaces = false}

[tool.setuptools.dynamic]
version = {attr = "autoflake.__version__"}

[tool.distutils.bdist_wheel]
universal = 1

[tool.flake8]
ignore = "E203,W503"
max-line-length = "88"
38 changes: 0 additions & 38 deletions setup.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions setup.py

This file was deleted.

0 comments on commit 9912a2e

Please sign in to comment.