From 65e81c215d7bb091c847a8c5ecf066282450a37f Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 26 Oct 2021 08:50:05 +0000 Subject: [PATCH] Remove blank lines after docstring --- minato_namikaze/bot_files/cogs/developer/developer.py | 1 - minato_namikaze/bot_files/cogs/info/mysupport.py | 1 - minato_namikaze/bot_files/cogs/polls.py | 1 - minato_namikaze/bot_files/lib/mendeleev/db.py | 3 --- .../bot_files/lib/mendeleev/electronegativity.py | 9 --------- minato_namikaze/bot_files/lib/mendeleev/utils.py | 1 - minato_namikaze/discordbot.py | 1 - 7 files changed, 17 deletions(-) diff --git a/minato_namikaze/bot_files/cogs/developer/developer.py b/minato_namikaze/bot_files/cogs/developer/developer.py index 35b535a1..525526e0 100644 --- a/minato_namikaze/bot_files/cogs/developer/developer.py +++ b/minato_namikaze/bot_files/cogs/developer/developer.py @@ -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): diff --git a/minato_namikaze/bot_files/cogs/info/mysupport.py b/minato_namikaze/bot_files/cogs/info/mysupport.py index c0379975..28b148a6 100644 --- a/minato_namikaze/bot_files/cogs/info/mysupport.py +++ b/minato_namikaze/bot_files/cogs/info/mysupport.py @@ -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" diff --git a/minato_namikaze/bot_files/cogs/polls.py b/minato_namikaze/bot_files/cogs/polls.py index e5036f11..b45e1b02 100644 --- a/minato_namikaze/bot_files/cogs/polls.py +++ b/minato_namikaze/bot_files/cogs/polls.py @@ -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 = [] diff --git a/minato_namikaze/bot_files/lib/mendeleev/db.py b/minato_namikaze/bot_files/lib/mendeleev/db.py index 056ab0c9..5d5afecd 100644 --- a/minato_namikaze/bot_files/lib/mendeleev/db.py +++ b/minato_namikaze/bot_files/lib/mendeleev/db.py @@ -11,13 +11,11 @@ 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) @@ -25,7 +23,6 @@ def get_engine(dbpath=None): 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() diff --git a/minato_namikaze/bot_files/lib/mendeleev/electronegativity.py b/minato_namikaze/bot_files/lib/mendeleev/electronegativity.py index 0c1d5eef..7efc4144 100644 --- a/minato_namikaze/bot_files/lib/mendeleev/electronegativity.py +++ b/minato_namikaze/bot_files/lib/mendeleev/electronegativity.py @@ -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) @@ -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) @@ -45,7 +43,6 @@ def gordy(zeff: float, radius: float) -> float: zeff: effective nuclear charge radius: value of the radius """ - return zeff / radius @@ -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) @@ -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))) @@ -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 @@ -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) @@ -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) @@ -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) diff --git a/minato_namikaze/bot_files/lib/mendeleev/utils.py b/minato_namikaze/bot_files/lib/mendeleev/utils.py index 5e3b3dba..4682d031 100644 --- a/minato_namikaze/bot_files/lib/mendeleev/utils.py +++ b/minato_namikaze/bot_files/lib/mendeleev/utils.py @@ -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}, diff --git a/minato_namikaze/discordbot.py b/minato_namikaze/discordbot.py index 4a4e3b32..3f5e3ec7 100644 --- a/minato_namikaze/discordbot.py +++ b/minato_namikaze/discordbot.py @@ -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: