Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace a default string value with None. #607

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions odo/backends/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def open_file(path, *args, **kwargs):
f.close()


def infer_header(path, nbytes=10000, encoding='utf-8', **kwargs):
def infer_header(path, nbytes=10000, encoding=None, **kwargs):
if encoding is None:
encoding = 'utf-8'
with open_file(path, 'rb') as f:
Expand All @@ -123,7 +123,7 @@ def newlines(encoding):
return b'\r\n'.decode(encoding), b'\n'.decode(encoding)


def sniff_dialect(path, nbytes, encoding='utf-8'):
def sniff_dialect(path, nbytes, encoding=None):
if not os.path.exists(path):
return {}
if encoding is None:
Expand Down Expand Up @@ -183,7 +183,7 @@ class CSV(object):
"""
canonical_extension = 'csv'

def __init__(self, path, has_header=None, encoding='utf-8',
def __init__(self, path, has_header=None, encoding=None,
sniff_nbytes=10000, buffer=None, **kwargs):
self.path = path
self._has_header = has_header
Expand Down