Skip to content

Commit

Permalink
Fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
pratik141 committed Oct 31, 2023
1 parent c6ab276 commit bec1857
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
9 changes: 4 additions & 5 deletions nsedt/equity.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def get_companyinfo(
symbol: str,
response_type: str = "panda_df",
):
"""_summary_
"""get_companyinfo
Args:\n
symbol (str): stock name\n
Expand Down Expand Up @@ -296,9 +296,8 @@ def get_asm_list(asm_type="both") -> list:

if asm_type == "both":
return _data
elif asm_type == "longterm":
if asm_type == "longterm":
return _data.get("longterm").get("data")
elif asm_type == "shortterm":
if asm_type == "shortterm":
return _data.get("shortterm").get("data")
else:
return ["possible values are both,longterm,shortterm"]
return ["possible values are both,longterm,shortterm"]
23 changes: 10 additions & 13 deletions nsedt/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,19 @@
"""

import json
import deprecated

import datetime
from warnings import warn
import pandas as pd
import requests
from nsedt.resources import constants as cns
import datetime
from warnings import warn



def get_headers():
"""
Args:
---
Returns:
---\n
Returns:\n
Json: json containing nse header
"""

Expand Down Expand Up @@ -107,11 +104,11 @@ def get_symbol(symbol: str, get_key: str) -> str:

def check_nd_convert(start_date: str, end_date: str) -> datetime:
"""
The function `check_nd_convert` takes two date strings in the format "%d-%m-%Y" and converts them to
datetime objects if they are not already in that format.
The function `check_nd_convert` takes two date strings in the format "%d-%m-%Y" and
converts them to datetime objects if they are not already in that format.
:param start_date: The `start_date` parameter is the starting date of a period, specified as a
string in the format "%d-%m-%Y"
:param start_date: The `start_date` parameter is the starting date of a period,
specified as a string in the format "%d-%m-%Y"
:type start_date: str
:param end_date: The `end_date` parameter is a string representing the end date in the format
"%d-%m-%Y"
Expand All @@ -132,6 +129,6 @@ def check_nd_convert(start_date: str, end_date: str) -> datetime:
end_date = datetime.datetime.strptime(end_date, "%d-%m-%Y")

else:
raise ("Input is of an unknown type")
raise ValueError("Input is of an unknown type" )

return start_date, end_date

0 comments on commit bec1857

Please sign in to comment.