Skip to content

Commit

Permalink
Merge pull request #266 from The-4th-Hokage/deepsource-fix-84b6d94f
Browse files Browse the repository at this point in the history
Remove blank lines after docstring
  • Loading branch information
Dhruvacube authored Oct 26, 2021
2 parents b3d64eb + 65e81c2 commit 38c8e0c
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion minato_namikaze/bot_files/cogs/developer/developer.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ async def unload(self, ctx, name: str):
@commands.check(owners)
async def reloadall(self, ctx):
"""Reloads all extensions."""

cog_dir = Path(__file__).resolve(strict=True).parent.parent
error_collection = []
for file in os.listdir(cog_dir):
Expand Down
1 change: 0 additions & 1 deletion minato_namikaze/bot_files/cogs/info/mysupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def get_last_commits(self, count=3):
@commands.command(aliases=["stats"])
async def about(self, ctx):
"""Tells you information about the bot itself."""

revision = self.get_last_commits()
embed = discord.Embed(description="Latest Changes:\n" + revision)
embed.title = "Official Bot Server Invite"
Expand Down
1 change: 0 additions & 1 deletion minato_namikaze/bot_files/cogs/polls.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ async def strawpoll(self, ctx, *, question):
Also can't use the tally command here
"""

# a list of messages to delete when we're all done
messages = [ctx.message]
answers = []
Expand Down
3 changes: 0 additions & 3 deletions minato_namikaze/bot_files/lib/mendeleev/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,18 @@

def get_package_dbpath():
"""Return the default database path"""

return os.path.join(os.path.abspath(os.path.dirname(__file__)), DBNAME)


def get_engine(dbpath=None):
"""Return the db engine"""

if not dbpath:
dbpath = get_package_dbpath()
return create_engine("sqlite:///{path:s}".format(path=dbpath), echo=False)


def get_session(dbpath=None):
"""Return the database session connection."""

engine = get_engine(dbpath=dbpath)
db_session = sessionmaker(bind=engine, autoflush=False, autocommit=False)
return db_session()
9 changes: 0 additions & 9 deletions minato_namikaze/bot_files/lib/mendeleev/electronegativity.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def allred_rochow(zeff: float, radius: float) -> float:
zeff: effective nuclear charge
radius: value of the radius
"""

return zeff / math.pow(radius, 2)


Expand All @@ -33,7 +32,6 @@ def cottrell_sutton(zeff: float, radius: float) -> float:
zeff: effective nuclear charge
radius: value of the radius
"""

return math.sqrt(zeff / radius)


Expand All @@ -45,7 +43,6 @@ def gordy(zeff: float, radius: float) -> float:
zeff: effective nuclear charge
radius: value of the radius
"""

return zeff / radius


Expand All @@ -58,7 +55,6 @@ def li_xue(ionization_energy: float, radius: float, valence_pqn: int) -> float:
radius: Type of radius to be used in the calculation, either `crystal_radius` as recommended in the paper or `ionic_radius`
valence_pqn: valence principal quantum number
"""

return (
n_effective(valence_pqn, source="zhang")
* math.sqrt(ionization_energy / RY)
Expand All @@ -80,7 +76,6 @@ def martynov_batsanov(ionization_energies: List[float]) -> float:
- :math:`n_{v}` is the number of valence electrons and
- :math:`I_{k}` is the :math:`k` th ionization potential.
"""

return math.sqrt(abs(sum(ionization_energies) / len(ionization_energies)))


Expand All @@ -103,7 +98,6 @@ def mulliken(
- :math:`I` is the ionization energy,
- :math:`A` is the electron affinity
"""

if ionization_energy is not None:
if (
electron_affinity is not None
Expand All @@ -125,7 +119,6 @@ def nagle(nvalence: int, polarizability: float) -> float:
nvalence: number of valence electrons
polarizability: dipole polarizability
"""

return math.pow(nvalence / polarizability, 1.0 / 3.0)


Expand All @@ -139,7 +132,6 @@ def sanderson(radius: float, noble_gas_radius: float) -> float:
.. math::
\chi = \\frac{AD}{AD_{\\text{ng}}}
"""

return math.pow(noble_gas_radius / radius, 3)


Expand All @@ -158,5 +150,4 @@ def generic(zeff: float, radius: float, rpow: float = 1, apow: float = 1) -> flo
- :math:`r` is the covalent radius
- :math:`\\alpha,\\beta` parameters
"""

return math.pow(zeff / math.pow(radius, rpow), apow)
1 change: 0 additions & 1 deletion minato_namikaze/bot_files/lib/mendeleev/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def n_effective(n: int, source: str = "slater") -> Union[float, None]:
1. Electronegativities of elements in valence states.
Inorganic Chemistry, 21(11), 3886–3889. https://doi.org/10.1021/ic00141a005
"""

numbers = {
"slater": {1: 1.0, 2: 2.0, 3: 3.0, 4: 3.7, 5: 4.0, 6: 4.2},
"zhang": {1: 0.85, 2: 1.99, 3: 2.89, 4: 3.45, 5: 3.85, 6: 4.36, 7: 4.99},
Expand Down
1 change: 0 additions & 1 deletion minato_namikaze/discordbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def token_get(tokenname):

def get_prefix(bot, message):
"""A callable Prefix for our bot. This could be edited to allow per server prefixes."""

prefixes = [")", "m!", "minato", "minato "]

if not message.guild:
Expand Down

0 comments on commit 38c8e0c

Please sign in to comment.