Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
run lint over specific directories, fix black issues
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche authored and jwhitlock committed Sep 8, 2020
1 parent ebba72e commit 5cb8d2b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 25 deletions.
5 changes: 3 additions & 2 deletions docker/run_lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
set -e

BLACKARGS=("--line-length=88" "--target-version=py37" bin docker ichnaea)
DIRS="ichnaea bin geocalclib docs"

if [[ $1 == "--fix" ]]; then
echo ">>> black fix"
Expand All @@ -21,8 +22,8 @@ if [[ $1 == "--fix" ]]; then
else
echo ">>> flake8 ($(python --version))"
cd /app
flake8
flake8 ${DIRS}

echo ">>> black"
black --check "${BLACKARGS[@]}"
black --check "${BLACKARGS[@]}" ${DIRS}
fi
39 changes: 20 additions & 19 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,45 @@


# Fake the shapely module so things will import
sys.modules['shapely'] = mock.MagicMock()
sys.modules["shapely"] = mock.MagicMock()


project = 'Ichnaea'
copyright = '2013-2020, Mozilla'
project = "Ichnaea"
copyright = "2013-2020, Mozilla"

# The short X.Y version.
version = '2.0'
version = "2.0"
# The full version, including alpha/beta/rc tags.
release = '2.0'
release = "2.0"

autoclass_content = 'class'
exclude_patterns = ['_build', '.DS_Store', 'Thumbs.db']
autoclass_content = "class"
exclude_patterns = ["_build", ".DS_Store", "Thumbs.db"]
html_static_path = []
modindex_common_prefix = ['ichnaea.']
pygments_style = 'sphinx'
source_suffix = '.rst'
templates_path = ['_templates']
modindex_common_prefix = ["ichnaea."]
pygments_style = "sphinx"
source_suffix = ".rst"
templates_path = ["_templates"]

# Use default theme if we are in ReadTheDocs
on_rtd = os.environ.get('READTHEDOCS') == 'True'
on_rtd = os.environ.get("READTHEDOCS") == "True"
if on_rtd:
html_theme = 'default'
html_theme = "default"
else:
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'

html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

extensions = [
'sphinx.ext.linkcode',
'everett.sphinxext',
"sphinx.ext.linkcode",
"everett.sphinxext",
]


def linkcode_resolve(domain, info):
if domain != 'py':
if domain != "py":
return None
if not info['module']:
if not info["module"]:
return None
filename = info['module'].replace('.', '/')
filename = info["module"].replace(".", "/")
return "https://github.com/mozilla/ichnaea/tree/main/%s.py" % filename
8 changes: 4 additions & 4 deletions geocalclib/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
numpy_include = numpy.get_include()
ext_modules = [
Extension(
name='geocalc',
sources=['geocalc.c'],
name="geocalc",
sources=["geocalc.c"],
include_dirs=[numpy_include],
),
]

setup(
name='geocalc',
name="geocalc",
license="Apache 2.0",
classifiers=[
"License :: OSI Approved :: Apache Software License",
Expand All @@ -27,7 +27,7 @@
"Programming Language :: Python :: Implementation :: CPython",
"Framework :: Pyramid",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application"
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
],
packages=find_packages(),
include_package_data=True,
Expand Down

0 comments on commit 5cb8d2b

Please sign in to comment.