Skip to content

Commit b08d432

Browse files
authored
Remove dead code (#393)
`_identify_input_type()` is unused in the code base. In addition, the `return` after `raise` can never be reached.
1 parent 9475b0f commit b08d432

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

pypandoc/__init__.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -280,17 +280,6 @@ def _as_unicode(source:any, encoding:str) -> any:
280280
return source
281281

282282

283-
def _identify_input_type(source:any, format:str, encoding:str='utf-8'):
284-
path = _identify_path(source)
285-
if path:
286-
format = _identify_format_from_path(source, format)
287-
input_type = 'path'
288-
else:
289-
source = _as_unicode(source, encoding)
290-
input_type = 'string'
291-
return source, format, input_type
292-
293-
294283
def normalize_format(fmt):
295284
formats = {
296285
'dbk': 'docbook',

pypandoc/pandoc_download.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def _get_pandoc_urls(version="latest"):
5151
version = version_url_frags[-1]
5252
except urllib.error.HTTPError as e:
5353
raise RuntimeError("Invalid pandoc version {}.".format(version))
54-
return
5554
# read the HTML content
5655
response = urlopen(f"https://github.com/jgm/pandoc/releases/expanded_assets/{version}")
5756
content = response.read()

0 commit comments

Comments
 (0)