Skip to content

Commit

Permalink
Merge branch 'master' into alternative-absolute-url-handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Gallaecio authored Aug 8, 2023
2 parents 556b810 + 6c7c318 commit d9f2af1
Show file tree
Hide file tree
Showing 12 changed files with 715 additions and 565 deletions.
15 changes: 15 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[flake8]
ignore =
# Refers to the max-line length. Let's suppress the error and simply
# let black take care on how it wants to format the lines.
E501,

# Refers to "line break before binary operator".
# Similar to above, let black take care of the formatting.
W503,

# Refers to "Unnecessary dict call - rewrite as a literal".
C408
per-file-ignores =
# Ignore: "Found for loop that reassigns the iterable it is iterating with each iterable value"
src/protego.py:430:21:B020
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Contains commits to be ignored due to linting

9097889fe2820cd582f0ae873b1be48eae47f818
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Run pre-commit linters
run: |
pip install -U pre-commit
pre-commit install && pre-commit run --all-files
- name: Run tests
env: ${{ matrix.env }}
run: |
Expand Down
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
repos:
- hooks:
- id: black
repo: https://github.com/psf/black
rev: 23.3.0
- hooks:
- id: isort
language_version: python3
repo: https://github.com/timothycrosley/isort
rev: 5.12.0
- hooks:
- id: flake8
language_version: python3
additional_dependencies:
- flake8-bugbear
- flake8-comprehensions
- flake8-debugger
- flake8-string-format
repo: https://github.com/pycqa/flake8
rev: 6.0.0
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tool.isort]
profile = "black"
multi_line_output = 3
65 changes: 33 additions & 32 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
#!/usr/bin/env python
from setuptools import setup, find_packages
from setuptools import find_packages, setup

setup(name='Protego',
version='0.2.1',
description='Pure-Python robots.txt parser with support for modern conventions',
long_description=open("README.rst").read(),
long_description_content_type='text/x-rst',
url='https://github.com/scrapy/protego',
author='Anubhav Patel',
author_email='anubhavp28@gmail.com',
license='BSD',
package_dir={'': 'src'},
packages=find_packages('src'),
py_modules=['protego'],
python_requires='>=3.8',
tests_require=['pytest'],
include_package_data=True,
keywords=['robots.txt', 'parser', 'robots', 'rep'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
)
setup(
name="Protego",
version="0.2.1",
description="Pure-Python robots.txt parser with support for modern conventions",
long_description=open("README.rst").read(),
long_description_content_type="text/x-rst",
url="https://github.com/scrapy/protego",
author="Anubhav Patel",
author_email="anubhavp28@gmail.com",
license="BSD",
package_dir={"": "src"},
packages=find_packages("src"),
py_modules=["protego"],
python_requires=">=3.7",
tests_require=["pytest"],
include_package_data=True,
keywords=["robots.txt", "parser", "robots", "rep"],
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
)
Loading

0 comments on commit d9f2af1

Please sign in to comment.