From 1efb5f935eb31f540288950c026b483c09e9f201 Mon Sep 17 00:00:00 2001 From: bbakernoaa Date: Thu, 23 Apr 2020 12:57:15 -0400 Subject: [PATCH 01/10] updating quick_imshow and quick_map to add rolling lon for data that goes 0->360. Adding quick_contourf as well. --- monet/monet_accessor.py | 114 +++++++++++++++++++++++++++++----------- monet/plots/__init__.py | 3 ++ 2 files changed, 87 insertions(+), 30 deletions(-) diff --git a/monet/monet_accessor.py b/monet/monet_accessor.py index f463fb0a..a74baac5 100644 --- a/monet/monet_accessor.py +++ b/monet/monet_accessor.py @@ -57,6 +57,20 @@ def _rename_latlon(ds): return ds +def _monet_to_latlon(da): + if isinstance(da, xr.DataArray): + dset = da.to_dataset() + dset['x'] = da.longitude[0, :].values + dset['y'] = da.latitude[:, 0].values + dset = dset.drop(['latitude', 'longitude']) + dset = dset.set_coords(['x', 'y']) + dset = dset.rename({'x': 'lon', 'y': 'lat'}) + if isinstance(da, xr.DataArray): + return dset[da.name] + else: + return dset + + def _dataset_to_monet(dset, lat_name='latitude', lon_name='longitude', @@ -1026,39 +1040,40 @@ def quick_imshow(self, map_kws={}, center=True, **kwargs): """ from .plots.mapgen import draw_map from .plots import _dynamic_fig_size + import matplotlib.pyplot as plt import cartopy.crs as ccrs import seaborn as sns sns.set_context('notebook', font_scale=1.2) - # da = _dataset_to_monet(self._obj) - da = _rename_to_monet_latlon(self._obj) + da = _dataset_to_monet(self._obj) + da = _monet_to_latlon(da) + crs_p = ccrs.PlateCarree() if 'crs' not in map_kws: - if ~center: - central_longitude = float(da.longitude.mean().values) - map_kws['crs'] = ccrs.PlateCarree( - central_longitude=central_longitude) - else: - map_kws['crs'] = ccrs.PlateCarree() + map_kws['crs'] = crs_p if 'figsize' in kwargs: map_kws['figsize'] = kwargs['figsize'] kwargs.pop('figsize', None) else: figsize = _dynamic_fig_size(da) map_kws['figsize'] = figsize - if 'extent' in kwargs: - kwargs.pop('extent') - map_kws['extent'] = [da.longitude.min(), da.longitude.max(), da.latitude.min(), da.latitude.max()] - f, ax = draw_map(return_fig=True, **map_kws) - ax = da.plot.imshow(x='longitude', y='latitude', ax=ax, - transform=ccrs.PlateCarree(), - **kwargs) + print(figsize[0], figsize[1]) + if 'transform' not in kwargs: + transform = crs_p + else: + transform = kwargs['transform'] + kwargs.pop('transform', None) + ax = draw_map(**map_kws) try: ax.axes.outline_patch.set_alpha(0) except: ax.outline_patch.set_alpha(0) - self._tight_layout() + ax = da.plot.imshow(ax=ax, + transform=ccrs.PlateCarree(), + infer_intervals=True, + **kwargs) + plt.tight_layout() return ax - def quick_map(self, map_kws={}, center=True, **kwargs): + def quick_map(self, map_kws={}, roll_dateline=False ** kwargs): """Creates a quick map view of a given data array. Parameters @@ -1076,27 +1091,31 @@ def quick_map(self, map_kws={}, center=True, **kwargs): """ from .plots.mapgen import draw_map from .plots import _dynamic_fig_size + import matplotlib.pyplot as plt import cartopy.crs as ccrs import seaborn as sns - sns.set_context('notebook', font_scale=1.2) + sns.set_context('notebook') da = _dataset_to_monet(self._obj) + crs_p = ccrs.PlateCarree() if 'crs' not in map_kws: - if ~center: - central_longitude = float(da.longitude.mean().values) - map_kws['crs'] = ccrs.PlateCarree( - central_longitude=central_longitude) - else: - map_kws['crs'] = ccrs.PlateCarree() + map_kws['crs'] = crs_p if 'figsize' in kwargs: map_kws['figsize'] = kwargs['figsize'] kwargs.pop('figsize', None) else: figsize = _dynamic_fig_size(da) map_kws['figsize'] = figsize - if 'extent' in kwargs: - kwargs.pop('extent') - map_kws['extent'] = [da.longitude.min(), da.longitude.max(), da.latitude.min(), da.latitude.max()] - f, ax = draw_map(return_fig=True, **map_kws) + print(figsize[0], figsize[1]) + if 'transform' not in kwargs: + transform = crs_p + else: + transform = kwargs['transform'] + kwargs.pop('transform', None) + ax = draw_map(**map_kws) + try: + ax.axes.outline_patch.set_alpha(0) + except: + ax.outline_patch.set_alpha(0) ax = _rename_to_monet_latlon(da).plot(x='longitude', y='latitude', ax=ax, @@ -1107,7 +1126,42 @@ def quick_map(self, map_kws={}, center=True, **kwargs): ax.axes.outline_patch.set_alpha(0) except: ax.outline_patch.set_alpha(0) - self._tight_layout() + plt.tight_layout() + return ax + + def _quick_contourf(self, map_kws={}, roll_dateline=False, **kwargs): + from monet.plots.mapgen import draw_map + from monet.plots import _dynamic_fig_size + import cartopy.crs as ccrs + import seaborn as sns + sns.set_context('notebook') + da = _dataset_to_monet(self._obj) + crs_p = ccrs.PlateCarree() + if 'crs' not in map_kws: + map_kws['crs'] = crs_p + if 'figsize' in kwargs: + map_kws['figsize'] = kwargs['figsize'] + kwargs.pop('figsize', None) + else: + figsize = _dynamic_fig_size(da) + map_kws['figsize'] = figsize + print(figsize[0], figsize[1]) + if 'transform' not in kwargs: + transform = crs_p + else: + transform = kwargs['transform'] + kwargs.pop('transform', None) + ax = draw_map(**map_kws) + try: + ax.axes.outline_patch.set_alpha(0) + except: + ax.outline_patch.set_alpha(0) + if roll_dateline: + ax = da.roll(x=int(len(da.x) / 2)).plot.contourf(x='longitude', y='latitude', ax=ax, transform=transform, **kwargs) + else: + ax = da.plot.contourf(x='longitude', y='latitude', ax=ax, transform=transform, **kwargs) + + plt.tight_layout() return ax def _tight_layout(self): @@ -1743,7 +1797,7 @@ def stratify(self, levels, vertical, axis=1): """Short summary. Parameters - ---------- + ---------- levels : type Description of parameter `levels`. vertical : type diff --git a/monet/plots/__init__.py b/monet/plots/__init__.py index 50a8629e..92a1ba11 100644 --- a/monet/plots/__init__.py +++ b/monet/plots/__init__.py @@ -30,6 +30,9 @@ def _dynamic_fig_size(obj): elif 'latitude' in obj.dims: nx, ny = len(obj.longitude), len(obj.latitude) scale = float(ny) / float(nx) + elif 'lat' in obj.dims: + nx, ny = len(obj.lon), len(obj.lat) + scale = float(ny) / float(nx) figsize = (10, 10 * scale) return figsize From b7f0917335e8920a5381b16c5edbc756e83a5c18 Mon Sep 17 00:00:00 2001 From: bbakernoaa Date: Thu, 23 Apr 2020 13:04:57 -0400 Subject: [PATCH 02/10] fix missing comma --- monet/monet_accessor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monet/monet_accessor.py b/monet/monet_accessor.py index a74baac5..f81ae987 100644 --- a/monet/monet_accessor.py +++ b/monet/monet_accessor.py @@ -1073,7 +1073,7 @@ def quick_imshow(self, map_kws={}, center=True, **kwargs): plt.tight_layout() return ax - def quick_map(self, map_kws={}, roll_dateline=False ** kwargs): + def quick_map(self, map_kws={}, roll_dateline=False, **kwargs): """Creates a quick map view of a given data array. Parameters From 9decfc8ba47b53b83c8348df0e0576c051421e4c Mon Sep 17 00:00:00 2001 From: bbakernoaa Date: Thu, 23 Apr 2020 13:20:55 -0400 Subject: [PATCH 03/10] various fixes for quick plotting methods --- monet/monet_accessor.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/monet/monet_accessor.py b/monet/monet_accessor.py index f81ae987..c621e0d5 100644 --- a/monet/monet_accessor.py +++ b/monet/monet_accessor.py @@ -1022,7 +1022,7 @@ def _check_kwargs_and_set_defaults(**kwargs): kwargs['filename'] = 'monet_xesmf_regrid_file.nc' return kwargs - def quick_imshow(self, map_kws={}, center=True, **kwargs): + def quick_imshow(self, map_kws={}, roll_datline=False, **kwargs): """Creates a quick map view of a given data array. Parameters @@ -1066,10 +1066,10 @@ def quick_imshow(self, map_kws={}, center=True, **kwargs): ax.axes.outline_patch.set_alpha(0) except: ax.outline_patch.set_alpha(0) - ax = da.plot.imshow(ax=ax, - transform=ccrs.PlateCarree(), - infer_intervals=True, - **kwargs) + if roll_dateline: + ax = da.roll(lon=int(len(da.lon) / 2), roll_coords=True).plot.imshow(ax=ax, transform=transform, **kwargs) + else: + ax = da.plot.imshow(ax=ax, transform=transform, **kwargs) plt.tight_layout() return ax @@ -1116,12 +1116,10 @@ def quick_map(self, map_kws={}, roll_dateline=False, **kwargs): ax.axes.outline_patch.set_alpha(0) except: ax.outline_patch.set_alpha(0) - ax = _rename_to_monet_latlon(da).plot(x='longitude', - y='latitude', - ax=ax, - transform=ccrs.PlateCarree(), - infer_intervals=True, - **kwargs) + if roll_dateline: + ax = da.roll(x=int(len(da.x) / 2), roll_coords=True).plot(x='longitude', y='latitude', ax=ax, transform=crs_p, **kwargs) + else: + ax = da.plot(x='longitude', y='latitude', ax=ax, transform=crs_p, **kwargs) try: ax.axes.outline_patch.set_alpha(0) except: @@ -1129,9 +1127,10 @@ def quick_map(self, map_kws={}, roll_dateline=False, **kwargs): plt.tight_layout() return ax - def _quick_contourf(self, map_kws={}, roll_dateline=False, **kwargs): + def quick_contourf(self, map_kws={}, roll_dateline=False, **kwargs): from monet.plots.mapgen import draw_map from monet.plots import _dynamic_fig_size + import matplotlib.pyplot as plt import cartopy.crs as ccrs import seaborn as sns sns.set_context('notebook') @@ -1157,7 +1156,7 @@ def _quick_contourf(self, map_kws={}, roll_dateline=False, **kwargs): except: ax.outline_patch.set_alpha(0) if roll_dateline: - ax = da.roll(x=int(len(da.x) / 2)).plot.contourf(x='longitude', y='latitude', ax=ax, transform=transform, **kwargs) + ax = da.roll(x=int(len(da.x) / 2), roll_coords=True).plot.contourf(x='longitude', y='latitude', ax=ax, transform=transform, **kwargs) else: ax = da.plot.contourf(x='longitude', y='latitude', ax=ax, transform=transform, **kwargs) From e49b05376e1423467e814b6c09a6a402fed1a858 Mon Sep 17 00:00:00 2001 From: bbakernoaa Date: Thu, 23 Apr 2020 13:26:15 -0400 Subject: [PATCH 04/10] fix imshow roll_dateline typo --- monet/monet_accessor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monet/monet_accessor.py b/monet/monet_accessor.py index c621e0d5..0e962b28 100644 --- a/monet/monet_accessor.py +++ b/monet/monet_accessor.py @@ -1022,7 +1022,7 @@ def _check_kwargs_and_set_defaults(**kwargs): kwargs['filename'] = 'monet_xesmf_regrid_file.nc' return kwargs - def quick_imshow(self, map_kws={}, roll_datline=False, **kwargs): + def quick_imshow(self, map_kws={}, roll_dateline=False, **kwargs): """Creates a quick map view of a given data array. Parameters From 005dc57a4490fbd576d0680bace41c2c0e1ee177 Mon Sep 17 00:00:00 2001 From: bbakernoaa Date: Fri, 24 Apr 2020 08:49:56 -0400 Subject: [PATCH 05/10] bumping version number to v2.2.1 to reflect changes in accessor and addition of quick_contourf --- meta.yaml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta.yaml b/meta.yaml index ff625c91..fed23f2c 100644 --- a/meta.yaml +++ b/meta.yaml @@ -1,5 +1,5 @@ {% set name = "monet" %} -{% set version = "2.2.0" %} +{% set version = "2.2.1" %} package: name: monet diff --git a/setup.py b/setup.py index 0d8a0a25..c3e3618d 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from distutils.core import setup setup(name='monet', - version='2.2.0', + version='2.2.1', url='https://github.com/noaa-oar-arl/MONET', license='MIT', include_package_data=True, From 706c413acbe78d94c65b8a8b26f861b7c4be3524 Mon Sep 17 00:00:00 2001 From: bbakernoaa Date: Fri, 24 Apr 2020 08:50:22 -0400 Subject: [PATCH 06/10] adding documentation for quick_contourf and other minor updates --- monet/monet_accessor.py | 62 ++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 17 deletions(-) diff --git a/monet/monet_accessor.py b/monet/monet_accessor.py index 0e962b28..95feb4d7 100644 --- a/monet/monet_accessor.py +++ b/monet/monet_accessor.py @@ -1023,19 +1023,25 @@ def _check_kwargs_and_set_defaults(**kwargs): return kwargs def quick_imshow(self, map_kws={}, roll_dateline=False, **kwargs): - """Creates a quick map view of a given data array. + """This function takes an xarray DataArray and quickly cerates a figure + using cartopy and the matplotlib imshow. Note that this should only be used for + regular grids. Parameters ---------- - map_kws : dict - kwargs for monet.plots.mapgen.draw_map. - **kwargs : dict - kwargs for xarray plotting. + map_kws : dictionary + kwargs for monet.plots.mapgen.draw_map + roll_dateline : bool + roll_dateline is meant to help with global datasets that the longitudes + range from 0 to 360 instead of -180 to 180. Otherwise a white line appears + at 0 degrees. + **kwargs : + kwargs for the xarray.DataArray.plot.imshow function Returns ------- matplotlib.axes - return of the axes handle for matplotlib. + axes """ from .plots.mapgen import draw_map @@ -1055,7 +1061,6 @@ def quick_imshow(self, map_kws={}, roll_dateline=False, **kwargs): else: figsize = _dynamic_fig_size(da) map_kws['figsize'] = figsize - print(figsize[0], figsize[1]) if 'transform' not in kwargs: transform = crs_p else: @@ -1074,19 +1079,24 @@ def quick_imshow(self, map_kws={}, roll_dateline=False, **kwargs): return ax def quick_map(self, map_kws={}, roll_dateline=False, **kwargs): - """Creates a quick map view of a given data array. + """This function takes an xarray DataArray and quickly cerates a figure + using cartopy and the matplotlib pcolormesh Parameters ---------- - map_kws : dict - kwargs for monet.plots.mapgen.draw_map. - **kwargs : dict - kwargs for xarray plotting. + map_kws : dictionary + kwargs for monet.plots.mapgen.draw_map + roll_dateline : bool + roll_dateline is meant to help with global datasets that the longitudes + range from 0 to 360 instead of -180 to 180. Otherwise a white line appears + at 0 degrees. + **kwargs : + kwargs for the xarray.DataArray.plot.pcolormesh function Returns ------- matplotlib.axes - return of the axes handle for matplotlib. + axes """ from .plots.mapgen import draw_map @@ -1105,7 +1115,6 @@ def quick_map(self, map_kws={}, roll_dateline=False, **kwargs): else: figsize = _dynamic_fig_size(da) map_kws['figsize'] = figsize - print(figsize[0], figsize[1]) if 'transform' not in kwargs: transform = crs_p else: @@ -1128,6 +1137,26 @@ def quick_map(self, map_kws={}, roll_dateline=False, **kwargs): return ax def quick_contourf(self, map_kws={}, roll_dateline=False, **kwargs): + """This function takes an xarray DataArray and quickly cerates a figure + using cartopy and the matplotlib contourf + + Parameters + ---------- + map_kws : dictionary + kwargs for monet.plots.mapgen.draw_map + roll_dateline : bool + roll_dateline is meant to help with global datasets that the longitudes + range from 0 to 360 instead of -180 to 180. Otherwise a white line appears + at 0 degrees. + **kwargs : + kwargs for the xarray.DataArray.plot.contourf function + + Returns + ------- + type + axes + + """ from monet.plots.mapgen import draw_map from monet.plots import _dynamic_fig_size import matplotlib.pyplot as plt @@ -1144,7 +1173,6 @@ def quick_contourf(self, map_kws={}, roll_dateline=False, **kwargs): else: figsize = _dynamic_fig_size(da) map_kws['figsize'] = figsize - print(figsize[0], figsize[1]) if 'transform' not in kwargs: transform = crs_p else: @@ -1156,9 +1184,9 @@ def quick_contourf(self, map_kws={}, roll_dateline=False, **kwargs): except: ax.outline_patch.set_alpha(0) if roll_dateline: - ax = da.roll(x=int(len(da.x) / 2), roll_coords=True).plot.contourf(x='longitude', y='latitude', ax=ax, transform=transform, **kwargs) + ax1 = da.roll(x=int(len(da.x) / 2), roll_coords=True).plot.contourf(x='longitude', y='latitude', ax=ax, transform=transform, **kwargs) else: - ax = da.plot.contourf(x='longitude', y='latitude', ax=ax, transform=transform, **kwargs) + ax1 = da.plot.contourf(x='longitude', y='latitude', ax=ax, transform=transform, **kwargs) plt.tight_layout() return ax From ae77bc0fd3119be7dea3574f20c014239a62e872 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 24 Apr 2020 12:54:57 +0000 Subject: [PATCH 07/10] Fixing style errors. --- monet/monet_accessor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/monet/monet_accessor.py b/monet/monet_accessor.py index 95feb4d7..9922112e 100644 --- a/monet/monet_accessor.py +++ b/monet/monet_accessor.py @@ -1126,7 +1126,8 @@ def quick_map(self, map_kws={}, roll_dateline=False, **kwargs): except: ax.outline_patch.set_alpha(0) if roll_dateline: - ax = da.roll(x=int(len(da.x) / 2), roll_coords=True).plot(x='longitude', y='latitude', ax=ax, transform=crs_p, **kwargs) + ax = da.roll(x=int(len(da.x) / 2), roll_coords=True).plot(x='longitude', + y='latitude', ax=ax, transform=crs_p, **kwargs) else: ax = da.plot(x='longitude', y='latitude', ax=ax, transform=crs_p, **kwargs) try: @@ -1184,7 +1185,8 @@ def quick_contourf(self, map_kws={}, roll_dateline=False, **kwargs): except: ax.outline_patch.set_alpha(0) if roll_dateline: - ax1 = da.roll(x=int(len(da.x) / 2), roll_coords=True).plot.contourf(x='longitude', y='latitude', ax=ax, transform=transform, **kwargs) + ax1 = da.roll(x=int(len(da.x) / 2), roll_coords=True).plot.contourf(x='longitude', + y='latitude', ax=ax, transform=transform, **kwargs) else: ax1 = da.plot.contourf(x='longitude', y='latitude', ax=ax, transform=transform, **kwargs) From f35f5bcb7825b53803e8d2a10b3afced72750f26 Mon Sep 17 00:00:00 2001 From: bbakernoaa Date: Fri, 24 Apr 2020 08:56:50 -0400 Subject: [PATCH 08/10] adding except AttributeError in quick functions try statements --- monet/monet_accessor.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/monet/monet_accessor.py b/monet/monet_accessor.py index 95feb4d7..325f7d64 100644 --- a/monet/monet_accessor.py +++ b/monet/monet_accessor.py @@ -1069,7 +1069,7 @@ def quick_imshow(self, map_kws={}, roll_dateline=False, **kwargs): ax = draw_map(**map_kws) try: ax.axes.outline_patch.set_alpha(0) - except: + except AttributeError: ax.outline_patch.set_alpha(0) if roll_dateline: ax = da.roll(lon=int(len(da.lon) / 2), roll_coords=True).plot.imshow(ax=ax, transform=transform, **kwargs) @@ -1123,16 +1123,12 @@ def quick_map(self, map_kws={}, roll_dateline=False, **kwargs): ax = draw_map(**map_kws) try: ax.axes.outline_patch.set_alpha(0) - except: + except AttributeError: ax.outline_patch.set_alpha(0) if roll_dateline: ax = da.roll(x=int(len(da.x) / 2), roll_coords=True).plot(x='longitude', y='latitude', ax=ax, transform=crs_p, **kwargs) else: ax = da.plot(x='longitude', y='latitude', ax=ax, transform=crs_p, **kwargs) - try: - ax.axes.outline_patch.set_alpha(0) - except: - ax.outline_patch.set_alpha(0) plt.tight_layout() return ax @@ -1181,7 +1177,7 @@ def quick_contourf(self, map_kws={}, roll_dateline=False, **kwargs): ax = draw_map(**map_kws) try: ax.axes.outline_patch.set_alpha(0) - except: + except AttributeError: ax.outline_patch.set_alpha(0) if roll_dateline: ax1 = da.roll(x=int(len(da.x) / 2), roll_coords=True).plot.contourf(x='longitude', y='latitude', ax=ax, transform=transform, **kwargs) From cbd59b2f7405248eb2879428d0e4b80617c61f7e Mon Sep 17 00:00:00 2001 From: bbakernoaa Date: Fri, 24 Apr 2020 08:59:26 -0400 Subject: [PATCH 09/10] style fixes --- monet/monet_accessor.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/monet/monet_accessor.py b/monet/monet_accessor.py index 2e077a0b..e1047573 100644 --- a/monet/monet_accessor.py +++ b/monet/monet_accessor.py @@ -1072,7 +1072,9 @@ def quick_imshow(self, map_kws={}, roll_dateline=False, **kwargs): except AttributeError: ax.outline_patch.set_alpha(0) if roll_dateline: - ax = da.roll(lon=int(len(da.lon) / 2), roll_coords=True).plot.imshow(ax=ax, transform=transform, **kwargs) + ax = da.roll(lon=int(len(da.lon) / 2), roll_coords=True).plot.imshow(ax=ax, + transform=transform, + **kwargs) else: ax = da.plot.imshow(ax=ax, transform=transform, **kwargs) plt.tight_layout() @@ -1127,7 +1129,10 @@ def quick_map(self, map_kws={}, roll_dateline=False, **kwargs): ax.outline_patch.set_alpha(0) if roll_dateline: ax = da.roll(x=int(len(da.x) / 2), roll_coords=True).plot(x='longitude', - y='latitude', ax=ax, transform=crs_p, **kwargs) + y='latitude', + ax=ax, + transform=crs_p, + **kwargs) else: ax = da.plot(x='longitude', y='latitude', ax=ax, transform=crs_p, **kwargs) plt.tight_layout() @@ -1182,7 +1187,10 @@ def quick_contourf(self, map_kws={}, roll_dateline=False, **kwargs): ax.outline_patch.set_alpha(0) if roll_dateline: ax1 = da.roll(x=int(len(da.x) / 2), roll_coords=True).plot.contourf(x='longitude', - y='latitude', ax=ax, transform=transform, **kwargs) + y='latitude', + ax=ax, + transform=transform, + **kwargs) else: ax1 = da.plot.contourf(x='longitude', y='latitude', ax=ax, transform=transform, **kwargs) From a2cb149c9b4cd7db3c3a5b042f123981d81599a0 Mon Sep 17 00:00:00 2001 From: bbakernoaa Date: Fri, 24 Apr 2020 09:00:33 -0400 Subject: [PATCH 10/10] making pep8speaks.yaml and .stickler.yml the same --- .pep8speaks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pep8speaks.yml b/.pep8speaks.yml index ae2a2707..e23ff421 100644 --- a/.pep8speaks.yml +++ b/.pep8speaks.yml @@ -5,7 +5,7 @@ scanner: linter: pycodestyle # Other option is flake8 pycodestyle: # Same as scanner.linter value. Other option is flake8 - max-line-length: 100 # Default is 79 in PEP 8 + max-line-length: 120 # Default is 79 in PEP 8 ignore: # Errors and warnings to ignore - W504 # line break after binary operator - E402 # module level import not at top of file