From 33744d591f128f26e8ed22a82b9648fadc9535b5 Mon Sep 17 00:00:00 2001 From: Saket Choudhary Date: Wed, 21 Aug 2024 20:25:26 +0530 Subject: [PATCH] Black formatting --- Makefile | 6 ++---- pysradb/cli.py | 1 + pysradb/filter_attrs.py | 6 +++--- pysradb/search.py | 1 + pysradb/sraweb.py | 20 ++++++++++---------- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index b02dd996..e6e83d44 100644 --- a/Makefile +++ b/Makefile @@ -76,13 +76,11 @@ servedocs: docs ## compile the docs watching for changes watchmedo shell-command -p '*.md|*.rst' -c '$(MAKE) -C docs html' -R -D . release: dist ## package and upload a release - python setup.py sdist - python setup.py bdist_wheel + python -m build twine upload dist/* dist: clean ## builds source and wheel package - python setup.py sdist - python setup.py bdist_wheel + python -m build ls -l dist install: clean ## install the package to the active Python's site-packages diff --git a/pysradb/cli.py b/pysradb/cli.py index a5f50530..281deb17 100644 --- a/pysradb/cli.py +++ b/pysradb/cli.py @@ -1,5 +1,6 @@ """Command line interface for pysradb """ + import argparse import os import re diff --git a/pysradb/filter_attrs.py b/pysradb/filter_attrs.py index 477d3cf9..0acbd67f 100644 --- a/pysradb/filter_attrs.py +++ b/pysradb/filter_attrs.py @@ -108,9 +108,9 @@ def expand_sample_attribute_columns(metadata_df): if sample_attribute_keys: sample_attribute_keys = list( map( - lambda x: x - if x not in metadata_df.columns.tolist() - else x + "_expanded", + lambda x: ( + x if x not in metadata_df.columns.tolist() else x + "_expanded" + ), sample_attribute_keys, ) ) diff --git a/pysradb/search.py b/pysradb/search.py index 2240bde8..1b80a750 100644 --- a/pysradb/search.py +++ b/pysradb/search.py @@ -1,5 +1,6 @@ """This file contains the search classes for the search feature. """ + import os import re import sys diff --git a/pysradb/sraweb.py b/pysradb/sraweb.py index a3ae141c..130214eb 100644 --- a/pysradb/sraweb.py +++ b/pysradb/sraweb.py @@ -71,15 +71,15 @@ def __init__(self, api_key=None): API key for ncbi eutils. """ self.base_url = dict() - self.base_url[ - "esummary" - ] = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi" - self.base_url[ - "esearch" - ] = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi" - self.base_url[ - "efetch" - ] = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi" + self.base_url["esummary"] = ( + "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi" + ) + self.base_url["esearch"] = ( + "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi" + ) + self.base_url["efetch"] = ( + "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi" + ) self.ena_fastq_search_url = "https://www.ebi.ac.uk/ena/portal/api/filereport" self.ena_params = [("result", "read_run"), ("fields", "fastq_ftp")] @@ -411,7 +411,7 @@ def sra_metadata( detailed=False, expand_sample_attributes=False, output_read_lengths=False, - **kwargs + **kwargs, ): esummary_result = self.get_esummary_response("sra", srp) try: