Skip to content

Commit 5e67f0a

Browse files
authored
Merge pull request #5 from slayoo/main
satisfying pylint :)
2 parents aa57771 + d7c9a24 commit 5e67f0a

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

.github/workflows/pylint.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Pylint
22

3-
on: [push]
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
48

59
jobs:
610
build:
@@ -19,4 +23,5 @@ jobs:
1923
pip install pylint
2024
- name: Analysing the code with pylint
2125
run: |
22-
pylint `ls -R|grep .py$|xargs`
26+
pylint $(git ls-files '*.py')
27+

atmos_cloud_sim_uj_utils/__init__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
from .pip_install_on_colab import pip_install_on_colab
1+
"""
2+
utility routines used in PySDM and PyMPDATA examples and tests
3+
"""
4+
from atmos_cloud_sim_uj_utils.pip_install_on_colab import pip_install_on_colab
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
# pylint: disable-next=missing-module-docstring
2+
13
def pip_install_on_colab(*args):
4+
"""executes pip (and ldconfig) ensuring Colab subtleties are handled as sane as it can get"""
5+
# pylint: disable-next=import-outside-toplevel
6+
# pylint: disable-next=multiple-imports
7+
# pylint: disable-next=import-error
28
import subprocess, notebook, tornado, sys
3-
subprocess.check_call([sys.executable, '-m', 'pip', '--quiet', '--use-deprecated=legacy-resolver', 'install',
4-
f'notebook=={notebook.__version__}',
5-
f'tornado=={tornado.version}',
6-
*args]
7-
)
9+
subprocess.check_call([
10+
sys.executable, '-m', 'pip', '--quiet', '--use-deprecated=legacy-resolver', 'install',
11+
f'notebook=={notebook.__version__}',
12+
f'tornado=={tornado.version}',
13+
*args
14+
])
815
subprocess.check_call(['ldconfig'])

setup.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
"""
2+
the magick behind ``pip install ...``
3+
"""
14
from setuptools import setup, find_packages
2-
import os
35

46

57
def get_long_description():
8+
"""returns contents of README.md file"""
69
with open("README.md", "r", encoding="utf8") as file:
710
long_description = file.read()
811
return long_description

0 commit comments

Comments
 (0)