Skip to content

Commit

Permalink
improve pylint score
Browse files Browse the repository at this point in the history
  • Loading branch information
obliviateandsurrender committed Aug 11, 2023
1 parent 5619695 commit eba1728
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
pip install -r requirements.txt
- name: Analysing the code with pylint
run: |
pylint --fail-under=8 $(git ls-files '*.py')
pylint --fail-under=9 $(git ls-files '*.py')
50 changes: 25 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,30 @@
from setuptools import setup

setup(
name='qdatasetgen',
version='0.1.0',
description='Quantum datasets generator scripts',
url='https://github.com/PennyLaneAI/DatasetsSource',
author='Utkarsh Azad',
author_email='[email protected]',
license='Apache',
packages=['quantum_datasets'],
install_requires=['numpy',
'pytest',
'pennylane',
'networkx',
'pylanczos',
],

name="qdatasetgen",
version="0.1.0",
description="Quantum datasets generator scripts",
url="https://github.com/PennyLaneAI/DatasetsSource",
author="Utkarsh Azad",
author_email="[email protected]",
license="Apache",
packages=["quantum_datasets"],
install_requires=[
"numpy",
"pytest",
"pennylane",
"networkx",
"pylanczos",
],
classifiers=[
'Development Status :: 1 - Planning',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
"Development Status :: 1 - Planning",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
],
)
)
5 changes: 2 additions & 3 deletions src/qchem.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@
qml.disable_return()


# pylint: disable=fixme
# pylint: disable=invalid-name
# pylint: disable=line-too-long
# pylint: disable=fixme, invalid-name, line-too-long, no-member
# pylint: disable=too-many-locals, too-many-arguments, too-many-instance-attributes
class ChemDataPipeline(DataPipeline):
"""Quantum Chemistry Data Pipeline Class"""

Expand Down
15 changes: 5 additions & 10 deletions src/spin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
import pennylane as qml


# pylint: disable=fixme
# pylint: disable=invalid-name
# pylint: disable=fixme, invalid-name, too-many-instance-attributes
class SpinSystem:
"""Spin System Class"""

Expand Down Expand Up @@ -59,8 +58,7 @@ def build_phase_data(self, psi, order_op):
return np.conjugate(psi.T) @ order_op @ psi


# pylint: disable=line-too-long
# pylint: disable=anomalous-backslash-in-string
# pylint: disable=line-too-long, anomalous-backslash-in-string, too-many-arguments, too-many-instance-attributes, too-many-arguments, too-many-instance-attributes
class IsingModel(SpinSystem):
"""IsingModel System Class"""

Expand Down Expand Up @@ -119,8 +117,7 @@ def build_order_params(self, psi0):
return self.build_phase_data(psi0, Mz)


# pylint: disable=line-too-long
# pylint: disable=anomalous-backslash-in-string
# pylint: disable=line-too-long, anomalous-backslash-in-string, too-many-arguments, too-many-instance-attributes, too-many-instance-attributes
class HeisenbergModel(SpinSystem):
"""HeisenbergModel System Class"""

Expand Down Expand Up @@ -173,8 +170,7 @@ def build_order_params(self, psi0):
return self.build_phase_data(psi0, Mz)


# pylint: disable=line-too-long
# pylint: disable=anomalous-backslash-in-string
# pylint: disable=line-too-long, anomalous-backslash-in-string, too-many-arguments, too-many-instance-attributes
class FermiHubbardModel(SpinSystem):
"""FermiHubbard System Class"""

Expand Down Expand Up @@ -266,8 +262,7 @@ def build_order_params(self, psi0):
return m_lor_op, m2_op


# pylint: disable=line-too-long
# pylint: disable=anomalous-backslash-in-string
# pylint: disable=line-too-long, anomalous-backslash-in-string, too-many-arguments, too-many-instance-attributes
class BoseHubbardModel(SpinSystem):
"""BoseHubbard System Class"""

Expand Down

0 comments on commit eba1728

Please sign in to comment.