Skip to content

Commit

Permalink
fix: remove bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Elijas committed Feb 13, 2024
1 parent 8a0c233 commit e86c813
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 76 deletions.
43 changes: 6 additions & 37 deletions nbs/00_types.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,45 +28,20 @@
"outputs": [],
"source": [
"# | hide\n",
"import jupyter_black\n",
"import nbdev"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <script type=\"application/javascript\" id=\"jupyter_black\">\n",
" (function() {\n",
" if (window.IPython === undefined) {\n",
" return\n",
" }\n",
" var msg = \"WARNING: it looks like you might have loaded \" +\n",
" \"jupyter_black in a non-lab notebook with \" +\n",
" \"`is_lab=True`. Please double check, and if \" +\n",
" \"loading with `%load_ext` please review the README!\"\n",
" console.log(msg)\n",
" alert(msg)\n",
" })()\n",
" </script>\n",
" "
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"# | hide\n",
"jupyter_black.load()"
"# | export\n",
"@dataclass\n",
"class Ticker:\n",
" symbol: str\n",
" exchange: str"
]
},
{
Expand All @@ -77,12 +52,6 @@
"source": [
"# | export\n",
"@dataclass\n",
"class Ticker:\n",
" symbol: str\n",
" exchange: str\n",
"\n",
"\n",
"@dataclass\n",
"class FilingMetadata:\n",
" accession_number: str\n",
" form_type: str\n",
Expand Down
39 changes: 5 additions & 34 deletions nbs/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,10 @@
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <script type=\"application/javascript\" id=\"jupyter_black\">\n",
" (function() {\n",
" if (window.IPython === undefined) {\n",
" return\n",
" }\n",
" var msg = \"WARNING: it looks like you might have loaded \" +\n",
" \"jupyter_black in a non-lab notebook with \" +\n",
" \"`is_lab=True`. Please double check, and if \" +\n",
" \"loading with `%load_ext` please review the README!\"\n",
" console.log(msg)\n",
" alert(msg)\n",
" })()\n",
" </script>\n",
" "
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"# | hide\n",
"import jupyter_black\n",
"from pprint import pprint as print\n",
"jupyter_black.load()"
"from pprint import pprint as print"
]
},
{
Expand Down Expand Up @@ -396,7 +367,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"'<?xml version=\"1.0\" ?><!--XBRL Document Created wi...'\n"
"\"<?xml version='1.0' encoding='ASCII'?>\\n<html xmlns...\"\n"
]
}
],
Expand Down Expand Up @@ -432,8 +403,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"('Path: sec-edgar-filings/GOOG/10-K/0001652044-22-000019/full-submission.txt\\n'\n",
" 'Content [len=15044932]: <SEC-DOCUMENT>0001652044-22-00...\\n')\n",
"('Path: sec-edgar-filings/GOOG/10-K/0001652044-24-000022/full-submission.txt\\n'\n",
" 'Content [len=13927595]: <SEC-DOCUMENT>0001652044-24-00...\\n')\n",
"('Path: sec-edgar-filings/GOOG/10-K/0001652044-23-000016/full-submission.txt\\n'\n",
" 'Content [len=15264470]: <SEC-DOCUMENT>0001652044-23-00...\\n')\n"
]
Expand Down
2 changes: 1 addition & 1 deletion sec_downloader/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.10.2"
__version__ = "0.11.0"
from sec_downloader.core import Downloader
from sec_downloader.download_storage import DownloadStorage, FileContent

Expand Down
3 changes: 2 additions & 1 deletion sec_downloader/core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from collections import namedtuple
from typing import Optional, Union

from sec_edgar_downloader import Downloader as SecEdgarDownloader
from sec_edgar_downloader._Downloader import Downloader as SecEdgarDownloader
from sec_edgar_downloader._orchestrator import get_ticker_to_cik_mapping
from sec_edgar_downloader._sec_gateway import download_filing

Expand All @@ -12,6 +12,7 @@
)
from sec_downloader.types import CompanyAndAccessionNumber, RequestedFilings

FileContent = namedtuple("FileContent", ["path", "content"])
DEFAULT_FILTER_PATTERN = "**/*.*"


Expand Down
4 changes: 2 additions & 2 deletions sec_downloader/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
from dataclasses import dataclass
from typing import Optional

# %% ../nbs/00_types.ipynb 4
# %% ../nbs/00_types.ipynb 3
@dataclass
class Ticker:
symbol: str
exchange: str


# %% ../nbs/00_types.ipynb 4
@dataclass
class FilingMetadata:
accession_number: str
Expand Down
2 changes: 1 addition & 1 deletion settings.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[DEFAULT]
repo = sec-downloader
lib_name = sec-downloader
version = 0.10.2
version = 0.11.0
min_python = 3.7
license = mit
black_formatting = False
Expand Down

0 comments on commit e86c813

Please sign in to comment.