Skip to content

Commit

Permalink
fix "SyntaxWarning: "is" with a literal..."
Browse files Browse the repository at this point in the history
  • Loading branch information
Mausy5043 committed Oct 5, 2022
1 parent 0b9c6d2 commit 98f2223
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build-backend = "hatchling.build"

[project]
name = "mausy5043-common"
version = "1.0.1"
version = "1.0.2"
dependencies = [
"numpy",
"pandas",
Expand Down
6 changes: 3 additions & 3 deletions src/mausy5043_common/libsqlite3.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import pandas as pd

import funfile as mf
from . import funfile as mf


class SqlDatabase:
Expand Down Expand Up @@ -112,10 +112,10 @@ def insert(self, method='ignore', index='sample_time'):
except s3.IntegrityError:
# probably "sqlite3.IntegrityError: UNIQUE constraint failed".
# this can be passed
if method is 'ignore':
if method == 'ignore':
mf.syslog_trace("Duplicate entry. Not adding to database.", False, self.debug)
pass
if method is 'replace':
if method == 'replace':
element_time = element[f'{df_idx}']
sql_command = f'DELETE FROM {self.table} WHERE sample_time = "{element_time}";'
# mf.syslog_trace(f"{sql_command}", False, self.debug)
Expand Down

0 comments on commit 98f2223

Please sign in to comment.