Skip to content
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: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
1 change: 0 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ You can use the
fix and disclosure.

If you are a tidelift subscriber, this is the preferred path

3 changes: 1 addition & 2 deletions doc/cmdline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ Environment variables
Set a username, password, and index URL for uploading packages.
See :ref:`uploading packages with environment variables <upload_envvars>`
for more information.

Token-based upload to PyPI is supported. To upload using a PyPI token,
set ``FLIT_USERNAME`` to ``__token__``, and ``FLIT_PASSWORD`` to the
token value.
Expand Down Expand Up @@ -270,4 +270,3 @@ Environment variables

`The SOURCE_DATE_EPOCH specification
<https://reproducible-builds.org/specs/source-date-epoch/>`__

1 change: 0 additions & 1 deletion doc/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ To run the tests in separate environments for each available Python version::
To run the tests in your current environment, run::

pytest

1 change: 0 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ Indices and tables

* :ref:`genindex`
* :ref:`search`

2 changes: 1 addition & 1 deletion flit/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import absolute_import
from __future__ import absolute_import

from . import main

Expand Down
4 changes: 2 additions & 2 deletions flit/logo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


logo = """
._ ._
._ ._
```. ```. .--.______
`. `-. `. / °,-—´
`. `~-.>.' /
Expand All @@ -12,7 +12,7 @@
/r_,.´| | | |
,' `/ |—— | | |
.´ ,'/ | |__ | |
.´ / . /
.´ / . /
'__/|/ V {version}

"""
Expand Down
1 change: 0 additions & 1 deletion flit/sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,4 +244,3 @@ def make_setup_py(self):
url=self.metadata.home_page,
extra='\n '.join(extra),
).encode('utf-8')

1 change: 0 additions & 1 deletion flit/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,3 @@ def validate_config(config_info):
for p in problems:
log.error(p)
return problems

1 change: 0 additions & 1 deletion flit/wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ def make_wheel_in(ini_path, wheel_directory, editable=False):

class WheelBuilder(core_wheel.WheelBuilder):
pass

2 changes: 1 addition & 1 deletion flit_core/flit_core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def _extract_extras(self, req):
return [item.strip() for item in list_str.split(',')]
else:
return None

def _normalise_requires_dist(self, req):
extras = self._extract_extras(req)
if extras:
Expand Down
6 changes: 3 additions & 3 deletions flit_core/flit_core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def __str__(self):

def prep_toml_config(d, path):
"""Validate config loaded from pyproject.toml and prepare common metadata

Returns a LoadedConfig object.
"""
dtool = d.get('tool', {}).get('flit', {})
Expand Down Expand Up @@ -310,11 +310,11 @@ def description_from_file(rel_path: str, proj_dir: Path, guess_mimetype=True):

def _prep_metadata(md_sect, path):
"""Process & verify the metadata from a config file

- Pull out the module name we're packaging.
- Read description-file and check that it's valid rst
- Convert dashes in key names to underscores
(e.g. home-page in config -> home_page in metadata)
(e.g. home-page in config -> home_page in metadata)
"""
if not set(md_sect).issuperset(metadata_required_fields):
missing = metadata_required_fields - set(md_sect)
Expand Down
1 change: 0 additions & 1 deletion flit_core/flit_core/vendor/tomli-1.2.3.dist-info/METADATA
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,3 @@ Parsing data.toml 5000 times:
The parsers are ordered from fastest to slowest, using the fastest parser as baseline.
Tomli performed the best out of all pure Python TOML parsers,
losing only to pytomlpp (wraps C++) and rtoml (wraps Rust).

1 change: 0 additions & 1 deletion flit_core/flit_core/versionno.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,3 @@ def normalise_version(orig_version):
log.warning("Version number normalised: {!r} -> {!r} (see PEP 440)"
.format(orig_version, version))
return version

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

from ._version import __version__

import a_package_that_doesnt_exist
import a_package_that_doesnt_exist
2 changes: 1 addition & 1 deletion flit_core/tests_core/samples/invalid_version1.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Sample module with invalid __version__ string"""

__version__ = "not starting with a number"
__version__ = "not starting with a number"
1 change: 0 additions & 1 deletion flit_core/tests_core/samples/ns1-pkg/ns1/pkg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
"""

__version__ = '0.1'

2 changes: 1 addition & 1 deletion flit_core/tests_core/test_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_main(tmp_path):
with ZipFile(wheels[0], 'r') as zf:
assert 'module1a.py' in zf.namelist()


def test_data_dir(tmp_path):
info = make_wheel_in(samples_dir / 'with_data_dir' / 'pyproject.toml', tmp_path)
assert_isfile(info.file)
Expand Down
1 change: 0 additions & 1 deletion prepare_license_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@

f.write("licenses = \\\n")
pprint.pprint(condensed, f)

1 change: 0 additions & 1 deletion tests/samples/altdistname/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ author = "Sir Robin"
author-email = "robin@camelot.uk"
home-page = "http://github.com/sirrobin/package1"
dist-name = "package-Dist1"

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[console_scripts]
foo=bar:baz
foo=bar:baz
2 changes: 1 addition & 1 deletion tests/samples/invalid_version1.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Sample module with invalid __version__ string"""

__version__ = "not starting with a number"
__version__ = "not starting with a number"
1 change: 0 additions & 1 deletion tests/samples/module3/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ module = "module3"
author = "Sir Robin"
author-email = "robin@camelot.uk"
home-page = "http://github.com/sirrobin/module3"

1 change: 0 additions & 1 deletion tests/samples/modulewithlocalversion/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ module = "modulewithlocalversion"
author = "Sir Robin"
author-email = "robin@camelot.uk"
home-page = "http://github.com/sirrobin/modulewithlocalversion"

1 change: 0 additions & 1 deletion tests/samples/ns1-pkg-mod/ns1/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
"""

__version__ = '0.1'

1 change: 0 additions & 1 deletion tests/samples/ns1-pkg/ns1/pkg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
"""

__version__ = '0.1'

1 change: 0 additions & 1 deletion tests/samples/ns1-pkg2/ns1/pkg2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
"""

__version__ = '0.1'

2 changes: 1 addition & 1 deletion tests/samples/with_flit_ini/some_entry_points.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[myplugins]
package1=package1:main
package1=package1:main
1 change: 0 additions & 1 deletion tests/test_vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ def test_identify_git_parent():
subdir.mkdir()
with cwd(subdir):
assert vcs.identify_vcs(Path('.')).name == 'git'

Loading