Skip to content

Commit

Permalink
Merge pull request #705 from hhatto/migrate-to-pyrojecttoml
Browse files Browse the repository at this point in the history
migrate to pyproject.toml
  • Loading branch information
hhatto authored Aug 27, 2023
2 parents 8f12c0a + 8bf787e commit 4e869ad
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 60 deletions.
52 changes: 52 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[project]
name = "autopep8"
description = "A tool that automatically formats Python code to conform to the PEP 8 style guide"
license = {file = "LICENSE.rst"}
authors = [
{name = "Hideo Hattori", email = "hhatto.jp@gmail.com"},
]
readme = "README.rst"
keywords = [
"automation",
"pep8",
"format",
"pycodestyle",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance",
]
requires-python = ">=3.6"
dependencies = [
"pycodestyle >= 2.10.0",
"tomli; python_version < '3.11'",
]
dynamic = ["version"]

[project.urls]
Repository = "https://github.com/hhatto/autopep8"

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

[tool.setuptools]
py-modules = ["autopep8"]

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

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
59 changes: 0 additions & 59 deletions setup.py

This file was deleted.

3 changes: 2 additions & 1 deletion test/test_autopep8.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_detect_encoding(self):
self.assertEqual(
'utf-8',
autopep8.detect_encoding(
os.path.join(ROOT_DIR, 'setup.py')))
os.path.join(ROOT_DIR, 'test', 'test_autopep8.py')))

def test_detect_encoding_with_cookie(self):
self.assertEqual(
Expand Down Expand Up @@ -5959,6 +5959,7 @@ def test_pyproject_toml_config_local_int_value(self):
with temporary_file_context('[tool.autopep8]\naggressive=2\n') as filename:
args = autopep8.parse_args(
[os.path.join(FAKE_CONFIGURATION, 'foo.py'),
'--ignore-local-config',
'--global-config={}'.format(filename)],
apply_config=True)
self.assertEqual(args.aggressive, 2)
Expand Down

0 comments on commit 4e869ad

Please sign in to comment.