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

Addition of new functionalities for Cartopy.gridliner #1693

Closed
wants to merge 0 commits into from

Conversation

PhilipeRLeal
Copy link

Dear all,

I would like to make a pull request in cartopy in order to add new functionalities for cartopy.

Rationale

These new assets have been derived from my personal struggle with cartopy's gridline and the continuous migration from the past basemap towards cartopy.

In this new branch, the gridline class has gained new assets for easier usage, especially regarding ticklabel_settings.

The list of the new functionalities related to gridline ticklabel settings:

  1. addition of a method for easy setting the decimal separators from the gridline ticklabels
  2. addition of a method for easy setting the maximum number of ticks in the gridline

Changes in respect to basemap->cartopy migration:

There has been a lot of discussion regarding scalebars (rulerbars) for geographical data in python, especially regaring cartopy:

  1. [ref 1 - stackoverflow] (https://stackoverflow.com/questions/32333870/how-can-i-show-a-km-ruler-on-a-cartopy-matplotlib-plot)
  2. [ref 2 - stackoverflow] (https://stackoverflow.com/questions/39786714/how-to-insert-scale-bar-in-a-map-in-matplotlib)
  3. [ref 3 - cartopy Issue Scale bar #490] (Scale bar #490)

Therefore, in this branch, I also developed a scalebar module, from which the user can draw a geographical rulerbar much similar to the ones observed in Geographical Information Systems (GIS). At the moment, I have set the module inside the cartopy.mpl subdirectory. That way, the manipulation of the geographical information becomes more organized in a same subpackage.

One aspect that may cause some constraints is that the scalebar module requires the geopy package. In future versions, its dependency may be broken by altering the geopy functions applied in the scalebar module.

Usage example the scalebar module

Implications

addition of a dependency of geopy package solely for the scalebar module.

@stickler-ci
Copy link

There are 311 errors:

  • examples/gridlines_and_labels/scalebar_example.py, line 9 - E501 line too long (128 > 79 characters)
  • examples/gridlines_and_labels/scalebar_example.py, line 12 - F401 'cartopy.feature as cfeature' imported but unused
  • examples/gridlines_and_labels/scalebar_example.py, line 17 - E302 expected 2 blank lines, found 1
  • examples/gridlines_and_labels/scalebar_example.py, line 19 - W291 trailing whitespace
  • examples/gridlines_and_labels/scalebar_example.py, line 20 - E127 continuation line over-indented for visual indent
  • examples/gridlines_and_labels/scalebar_example.py, line 21 - E127 continuation line over-indented for visual indent
    W291 trailing whitespace
  • examples/gridlines_and_labels/scalebar_example.py, line 26 - F841 local variable 'f3' is assigned to but never used
  • lib/cartopy/mpl/formatters.py, line 18 - E302 expected 2 blank lines, found 1
  • lib/cartopy/mpl/formatters.py, line 34 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 37 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 42 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 47 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 48 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 49 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 56 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 62 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 63 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 64 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 65 - E501 line too long (101 > 79 characters)
    W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 66 - E128 continuation line under-indented for visual indent
    E231 missing whitespace after ','
  • lib/cartopy/mpl/formatters.py, line 67 - E122 continuation line missing indentation or outdented
  • lib/cartopy/mpl/formatters.py, line 68 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 69 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 70 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 71 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 74 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 75 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 80 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 83 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 87 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 93 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 96 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 97 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 98 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 101 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 102 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 103 - E303 too many blank lines (2)
    E231 missing whitespace after ','
    E501 line too long (82 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 104 - E127 continuation line over-indented for visual indent
    E501 line too long (81 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 105 - E127 continuation line over-indented for visual indent
  • lib/cartopy/mpl/formatters.py, line 107 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 108 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 109 - E303 too many blank lines (3)
  • lib/cartopy/mpl/formatters.py, line 110 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/formatters.py, line 111 - E124 closing bracket does not match visual indentation
  • lib/cartopy/mpl/formatters.py, line 112 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 114 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 116 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 117 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 118 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 121 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 122 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 123 - E303 too many blank lines (3)
  • lib/cartopy/mpl/formatters.py, line 124 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 125 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 129 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 130 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 131 - E303 too many blank lines (2)
    E501 line too long (85 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 132 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/formatters.py, line 133 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/formatters.py, line 134 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 135 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 136 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 137 - E303 too many blank lines (3)
  • lib/cartopy/mpl/formatters.py, line 138 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/formatters.py, line 139 - E124 closing bracket does not match visual indentation
  • lib/cartopy/mpl/formatters.py, line 140 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 142 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 144 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 145 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 146 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 155 - E303 too many blank lines (5)
  • lib/cartopy/mpl/formatters.py, line 159 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 160 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 161 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 166 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 169 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 172 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 175 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 178 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 180 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 182 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 184 - E303 too many blank lines (2)
    W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 185 - E501 line too long (81 > 79 characters)
    W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 186 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 187 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 188 - E501 line too long (83 > 79 characters)
    W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 189 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 191 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 192 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 193 - E501 line too long (82 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 194 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 196 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 197 - E203 whitespace before ':'
    E501 line too long (99 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 198 - E203 whitespace before ':'
    E501 line too long (99 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 199 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 202 - E203 whitespace before ':'
    E501 line too long (103 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 204 - E203 whitespace before ':'
    E501 line too long (103 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 205 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 206 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 207 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 211 - E303 too many blank lines (3)
  • lib/cartopy/mpl/formatters.py, line 216 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 217 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 218 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 219 - E128 continuation line under-indented for visual indent
    E501 line too long (83 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 220 - E128 continuation line under-indented for visual indent
    E501 line too long (83 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 221 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 226 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 227 - E303 too many blank lines (4)
  • lib/cartopy/mpl/formatters.py, line 232 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 234 - E128 continuation line under-indented for visual indent
    E501 line too long (84 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 235 - E128 continuation line under-indented for visual indent
    E501 line too long (84 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 236 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 237 - W292 no newline at end of file
  • lib/cartopy/mpl/gridliner.py, line 23 - W293 blank line contains whitespace
  • lib/cartopy/mpl/gridliner.py, line 24 - W291 trailing whitespace
  • lib/cartopy/mpl/gridliner.py, line 924 - W292 no newline at end of file
  • lib/cartopy/mpl/scalebar.py, line 2 - F401 'cartopy.feature as cfeature' imported but unused
  • lib/cartopy/mpl/scalebar.py, line 8 - F401 'matplotlib.ticker as mticker' imported but unused
  • lib/cartopy/mpl/scalebar.py, line 11 - F401 'geopy.distance.distance' imported but unused
    F401 'geopy.distance.lonlat' imported but unused
  • lib/cartopy/mpl/scalebar.py, line 12 - F401 'geopy' imported but unused
  • lib/cartopy/mpl/scalebar.py, line 14 - E302 expected 2 blank lines, found 1
  • lib/cartopy/mpl/scalebar.py, line 18 - F811 redefinition of unused 'lonlat' from line 11
  • lib/cartopy/mpl/scalebar.py, line 23 - F811 redefinition of unused 'distance' from line 11
  • lib/cartopy/mpl/scalebar.py, line 56 - F811 redefinition of unused 'distance' from line 11
  • lib/cartopy/mpl/scalebar.py, line 97 - F811 redefinition of unused 'distance' from line 11
  • lib/cartopy/mpl/scalebar.py, line 181 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 194 - E303 too many blank lines (4)
  • lib/cartopy/mpl/scalebar.py, line 195 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 199 - E501 line too long (104 > 79 characters)
  • lib/cartopy/mpl/scalebar.py, line 200 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 201 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 203 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 205 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 210 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 212 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 215 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 216 - E303 too many blank lines (2)
    E201 whitespace after '('
  • lib/cartopy/mpl/scalebar.py, line 217 - E201 whitespace after '('
  • lib/cartopy/mpl/scalebar.py, line 218 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 219 - E201 whitespace after '('
  • lib/cartopy/mpl/scalebar.py, line 220 - E201 whitespace after '('
  • lib/cartopy/mpl/scalebar.py, line 221 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 224 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 226 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 227 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 228 - E303 too many blank lines (2)
    E231 missing whitespace after ','
  • lib/cartopy/mpl/scalebar.py, line 229 - E127 continuation line over-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 230 - E127 continuation line over-indented for visual indent
    W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 231 - E127 continuation line over-indented for visual indent
    W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 232 - E127 continuation line over-indented for visual indent
    E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/mpl/scalebar.py, line 233 - E127 continuation line over-indented for visual indent
    W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 234 - E127 continuation line over-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 235 - E127 continuation line over-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 236 - E127 continuation line over-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 237 - E127 continuation line over-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 245 - E303 too many blank lines (4)
    W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 246 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 248 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 249 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 251 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 253 - E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/mpl/scalebar.py, line 254 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 256 - E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/mpl/scalebar.py, line 257 - E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/mpl/scalebar.py, line 259 - E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/mpl/scalebar.py, line 261 - E251 unexpected spaces around keyword / parameter equals
    E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 262 - E128 continuation line under-indented for visual indent
    E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 263 - E128 continuation line under-indented for visual indent
    E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 264 - E128 continuation line under-indented for visual indent
    E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 265 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 266 - E128 continuation line under-indented for visual indent
    E251 unexpected spaces around keyword / parameter equals
    E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 267 - E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 268 - E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 269 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 270 - E128 continuation line under-indented for visual indent
    E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 271 - E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 272 - E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 273 - E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 274 - E124 closing bracket does not match visual indentation
  • lib/cartopy/mpl/scalebar.py, line 275 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 276 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 277 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 278 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 279 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 280 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 281 - E303 too many blank lines (6)
  • lib/cartopy/mpl/scalebar.py, line 289 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 290 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 291 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 294 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 296 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 297 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 298 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 302 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 303 - E203 whitespace before ','
    E225 missing whitespace around operator
  • lib/cartopy/mpl/scalebar.py, line 305 - E201 whitespace after '('
    E202 whitespace before ')'
  • lib/cartopy/mpl/scalebar.py, line 306 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 309 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 313 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 314 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 315 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 317 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 318 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 319 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 320 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 321 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 323 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 324 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 326 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 327 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 328 - E303 too many blank lines (2)
    E225 missing whitespace around operator
  • lib/cartopy/mpl/scalebar.py, line 329 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 330 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 331 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 334 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 336 - E231 missing whitespace after ','
  • lib/cartopy/mpl/scalebar.py, line 337 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 340 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 342 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 348 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 350 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 352 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 356 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 357 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 358 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 360 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 362 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 363 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 364 - E303 too many blank lines (2)
    W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 365 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 366 - E128 continuation line under-indented for visual indent
    E251 unexpected spaces around keyword / parameter equals
    E203 whitespace before ','
  • lib/cartopy/mpl/scalebar.py, line 367 - E128 continuation line under-indented for visual indent
    E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/mpl/scalebar.py, line 368 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 369 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 370 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 371 - E303 too many blank lines (3)
  • lib/cartopy/mpl/scalebar.py, line 373 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 377 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 378 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 379 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 380 - E303 too many blank lines (3)
  • lib/cartopy/mpl/scalebar.py, line 381 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 383 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 408 - E128 continuation line under-indented for visual indent
    E265 block comment should start with '# '
    E501 line too long (100 > 79 characters)
  • lib/cartopy/mpl/scalebar.py, line 409 - E124 closing bracket does not match visual indentation
  • lib/cartopy/mpl/scalebar.py, line 410 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 411 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 412 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 414 - E265 block comment should start with '# '
  • lib/cartopy/mpl/scalebar.py, line 415 - E265 block comment should start with '# '
    W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 418 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 419 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 420 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 421 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 422 - E303 too many blank lines (4)
  • lib/cartopy/mpl/scalebar.py, line 423 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 424 - F821 undefined name '_add_numeric_scale_bar'
    E501 line too long (86 > 79 characters)
    W292 no newline at end of file
  • lib/cartopy/tests/mpl/test_gridliner.py, line 368 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 369 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 370 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 372 - E303 too many blank lines (4)
  • lib/cartopy/tests/mpl/test_gridliner.py, line 373 - F841 local variable 'fig' is assigned to but never used
  • lib/cartopy/tests/mpl/test_gridliner.py, line 381 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 383 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 385 - E722 do not use bare 'except'
  • lib/cartopy/tests/mpl/test_gridliner.py, line 387 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 388 - E201 whitespace after '('
    E712 comparison to True should be 'if cond is True:' or 'if cond:'
    E225 missing whitespace around operator
  • lib/cartopy/tests/mpl/test_gridliner.py, line 389 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 390 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 393 - E303 too many blank lines (4)
  • lib/cartopy/tests/mpl/test_gridliner.py, line 394 - F841 local variable 'fig' is assigned to but never used
  • lib/cartopy/tests/mpl/test_gridliner.py, line 401 - E501 line too long (84 > 79 characters)
    W291 trailing whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 402 - W291 trailing whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 404 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 406 - E722 do not use bare 'except'
  • lib/cartopy/tests/mpl/test_gridliner.py, line 408 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 409 - E201 whitespace after '('
    E712 comparison to True should be 'if cond is True:' or 'if cond:'
    E225 missing whitespace around operator
  • lib/cartopy/tests/mpl/test_gridliner.py, line 410 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 411 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 413 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 414 - E303 too many blank lines (4)
  • lib/cartopy/tests/mpl/test_gridliner.py, line 415 - F841 local variable 'fig' is assigned to but never used
  • lib/cartopy/tests/mpl/test_gridliner.py, line 423 - E128 continuation line under-indented for visual indent
  • lib/cartopy/tests/mpl/test_gridliner.py, line 424 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 426 - E128 continuation line under-indented for visual indent
  • lib/cartopy/tests/mpl/test_gridliner.py, line 427 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 429 - E722 do not use bare 'except'
  • lib/cartopy/tests/mpl/test_gridliner.py, line 431 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 432 - E201 whitespace after '('
    E712 comparison to True should be 'if cond is True:' or 'if cond:'
    E225 missing whitespace around operator
  • lib/cartopy/tests/mpl/test_gridliner.py, line 433 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 434 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 438 - W391 blank line at end of file
    W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 7 - F401 'unittest.mock' imported but unused
  • lib/cartopy/tests/mpl/test_scalebar.py, line 9 - F401 'matplotlib.testing.decorators.cleanup' imported but unused
  • lib/cartopy/tests/mpl/test_scalebar.py, line 10 - F401 'matplotlib.path as mpath' imported but unused
  • lib/cartopy/tests/mpl/test_scalebar.py, line 12 - F401 'numpy as np' imported but unused
  • lib/cartopy/tests/mpl/test_scalebar.py, line 13 - F401 'pytest' imported but unused
  • lib/cartopy/tests/mpl/test_scalebar.py, line 26 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 28 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 30 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 32 - F821 undefined name 'projection'
  • lib/cartopy/tests/mpl/test_scalebar.py, line 33 - W291 trailing whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 34 - W291 trailing whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 36 - W291 trailing whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 38 - W291 trailing whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 39 - E127 continuation line over-indented for visual indent
  • lib/cartopy/tests/mpl/test_scalebar.py, line 40 - E127 continuation line over-indented for visual indent
  • lib/cartopy/tests/mpl/test_scalebar.py, line 41 - E127 continuation line over-indented for visual indent
    E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/tests/mpl/test_scalebar.py, line 42 - E127 continuation line over-indented for visual indent
    E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/tests/mpl/test_scalebar.py, line 43 - W391 blank line at end of file

@SciTools-assistant SciTools-assistant added the Blocked: CLA needed See https://scitools.org.uk. Submit the form at: https://scitools.org.uk/cla/v4/form label Dec 16, 2020
@stickler-ci
Copy link

There are 311 errors:

  • examples/gridlines_and_labels/scalebar_example.py, line 9 - E501 line too long (128 > 79 characters)
  • examples/gridlines_and_labels/scalebar_example.py, line 12 - F401 'cartopy.feature as cfeature' imported but unused
  • examples/gridlines_and_labels/scalebar_example.py, line 17 - E302 expected 2 blank lines, found 1
  • examples/gridlines_and_labels/scalebar_example.py, line 19 - W291 trailing whitespace
  • examples/gridlines_and_labels/scalebar_example.py, line 20 - E127 continuation line over-indented for visual indent
  • examples/gridlines_and_labels/scalebar_example.py, line 21 - E127 continuation line over-indented for visual indent
    W291 trailing whitespace
  • examples/gridlines_and_labels/scalebar_example.py, line 26 - F841 local variable 'f3' is assigned to but never used
  • lib/cartopy/mpl/formatters.py, line 18 - E302 expected 2 blank lines, found 1
  • lib/cartopy/mpl/formatters.py, line 34 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 37 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 42 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 47 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 48 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 49 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 56 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 62 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 63 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 64 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 65 - E501 line too long (101 > 79 characters)
    W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 66 - E128 continuation line under-indented for visual indent
    E231 missing whitespace after ','
  • lib/cartopy/mpl/formatters.py, line 67 - E122 continuation line missing indentation or outdented
  • lib/cartopy/mpl/formatters.py, line 68 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 69 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 70 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 71 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 74 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 75 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 80 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 83 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 87 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 93 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 96 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 97 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 98 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 101 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 102 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 103 - E303 too many blank lines (2)
    E231 missing whitespace after ','
    E501 line too long (82 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 104 - E127 continuation line over-indented for visual indent
    E501 line too long (81 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 105 - E127 continuation line over-indented for visual indent
  • lib/cartopy/mpl/formatters.py, line 107 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 108 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 109 - E303 too many blank lines (3)
  • lib/cartopy/mpl/formatters.py, line 110 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/formatters.py, line 111 - E124 closing bracket does not match visual indentation
  • lib/cartopy/mpl/formatters.py, line 112 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 114 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 116 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 117 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 118 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 121 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 122 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 123 - E303 too many blank lines (3)
  • lib/cartopy/mpl/formatters.py, line 124 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 125 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 129 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 130 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 131 - E303 too many blank lines (2)
    E501 line too long (85 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 132 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/formatters.py, line 133 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/formatters.py, line 134 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 135 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 136 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 137 - E303 too many blank lines (3)
  • lib/cartopy/mpl/formatters.py, line 138 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/formatters.py, line 139 - E124 closing bracket does not match visual indentation
  • lib/cartopy/mpl/formatters.py, line 140 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 142 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 144 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 145 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 146 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 155 - E303 too many blank lines (5)
  • lib/cartopy/mpl/formatters.py, line 159 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 160 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 161 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 166 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 169 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 172 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 175 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 178 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 180 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 182 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 184 - E303 too many blank lines (2)
    W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 185 - E501 line too long (81 > 79 characters)
    W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 186 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 187 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 188 - E501 line too long (83 > 79 characters)
    W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 189 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 191 - W291 trailing whitespace
  • lib/cartopy/mpl/formatters.py, line 192 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 193 - E501 line too long (82 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 194 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 196 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 197 - E203 whitespace before ':'
    E501 line too long (99 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 198 - E203 whitespace before ':'
    E501 line too long (99 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 199 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 202 - E203 whitespace before ':'
    E501 line too long (103 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 204 - E203 whitespace before ':'
    E501 line too long (103 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 205 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 206 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 207 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 211 - E303 too many blank lines (3)
  • lib/cartopy/mpl/formatters.py, line 216 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 217 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 218 - E303 too many blank lines (2)
  • lib/cartopy/mpl/formatters.py, line 219 - E128 continuation line under-indented for visual indent
    E501 line too long (83 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 220 - E128 continuation line under-indented for visual indent
    E501 line too long (83 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 221 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 226 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 227 - E303 too many blank lines (4)
  • lib/cartopy/mpl/formatters.py, line 232 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 234 - E128 continuation line under-indented for visual indent
    E501 line too long (84 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 235 - E128 continuation line under-indented for visual indent
    E501 line too long (84 > 79 characters)
  • lib/cartopy/mpl/formatters.py, line 236 - W293 blank line contains whitespace
  • lib/cartopy/mpl/formatters.py, line 237 - W292 no newline at end of file
  • lib/cartopy/mpl/gridliner.py, line 23 - W293 blank line contains whitespace
  • lib/cartopy/mpl/gridliner.py, line 24 - W291 trailing whitespace
  • lib/cartopy/mpl/gridliner.py, line 924 - W292 no newline at end of file
  • lib/cartopy/mpl/scalebar.py, line 2 - F401 'cartopy.feature as cfeature' imported but unused
  • lib/cartopy/mpl/scalebar.py, line 8 - F401 'matplotlib.ticker as mticker' imported but unused
  • lib/cartopy/mpl/scalebar.py, line 11 - F401 'geopy.distance.distance' imported but unused
    F401 'geopy.distance.lonlat' imported but unused
  • lib/cartopy/mpl/scalebar.py, line 12 - F401 'geopy' imported but unused
  • lib/cartopy/mpl/scalebar.py, line 14 - E302 expected 2 blank lines, found 1
  • lib/cartopy/mpl/scalebar.py, line 18 - F811 redefinition of unused 'lonlat' from line 11
  • lib/cartopy/mpl/scalebar.py, line 23 - F811 redefinition of unused 'distance' from line 11
  • lib/cartopy/mpl/scalebar.py, line 56 - F811 redefinition of unused 'distance' from line 11
  • lib/cartopy/mpl/scalebar.py, line 97 - F811 redefinition of unused 'distance' from line 11
  • lib/cartopy/mpl/scalebar.py, line 181 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 194 - E303 too many blank lines (4)
  • lib/cartopy/mpl/scalebar.py, line 195 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 199 - E501 line too long (104 > 79 characters)
  • lib/cartopy/mpl/scalebar.py, line 200 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 201 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 203 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 205 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 210 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 212 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 215 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 216 - E303 too many blank lines (2)
    E201 whitespace after '('
  • lib/cartopy/mpl/scalebar.py, line 217 - E201 whitespace after '('
  • lib/cartopy/mpl/scalebar.py, line 218 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 219 - E201 whitespace after '('
  • lib/cartopy/mpl/scalebar.py, line 220 - E201 whitespace after '('
  • lib/cartopy/mpl/scalebar.py, line 221 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 224 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 226 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 227 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 228 - E303 too many blank lines (2)
    E231 missing whitespace after ','
  • lib/cartopy/mpl/scalebar.py, line 229 - E127 continuation line over-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 230 - E127 continuation line over-indented for visual indent
    W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 231 - E127 continuation line over-indented for visual indent
    W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 232 - E127 continuation line over-indented for visual indent
    E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/mpl/scalebar.py, line 233 - E127 continuation line over-indented for visual indent
    W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 234 - E127 continuation line over-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 235 - E127 continuation line over-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 236 - E127 continuation line over-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 237 - E127 continuation line over-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 245 - E303 too many blank lines (4)
    W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 246 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 248 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 249 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 251 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 253 - E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/mpl/scalebar.py, line 254 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 256 - E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/mpl/scalebar.py, line 257 - E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/mpl/scalebar.py, line 259 - E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/mpl/scalebar.py, line 261 - E251 unexpected spaces around keyword / parameter equals
    E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 262 - E128 continuation line under-indented for visual indent
    E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 263 - E128 continuation line under-indented for visual indent
    E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 264 - E128 continuation line under-indented for visual indent
    E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 265 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 266 - E128 continuation line under-indented for visual indent
    E251 unexpected spaces around keyword / parameter equals
    E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 267 - E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 268 - E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 269 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 270 - E128 continuation line under-indented for visual indent
    E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 271 - E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 272 - E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 273 - E231 missing whitespace after ':'
  • lib/cartopy/mpl/scalebar.py, line 274 - E124 closing bracket does not match visual indentation
  • lib/cartopy/mpl/scalebar.py, line 275 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 276 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 277 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 278 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 279 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 280 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 281 - E303 too many blank lines (6)
  • lib/cartopy/mpl/scalebar.py, line 289 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 290 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 291 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 294 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 296 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 297 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 298 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 302 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 303 - E203 whitespace before ','
    E225 missing whitespace around operator
  • lib/cartopy/mpl/scalebar.py, line 305 - E201 whitespace after '('
    E202 whitespace before ')'
  • lib/cartopy/mpl/scalebar.py, line 306 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 309 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 313 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 314 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 315 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 317 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 318 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 319 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 320 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 321 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 323 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 324 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 326 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 327 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 328 - E303 too many blank lines (2)
    E225 missing whitespace around operator
  • lib/cartopy/mpl/scalebar.py, line 329 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 330 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 331 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 334 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 336 - E231 missing whitespace after ','
  • lib/cartopy/mpl/scalebar.py, line 337 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 340 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 342 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 348 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 350 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 352 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 356 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 357 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 358 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 360 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 362 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 363 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 364 - E303 too many blank lines (2)
    W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 365 - E128 continuation line under-indented for visual indent
  • lib/cartopy/mpl/scalebar.py, line 366 - E128 continuation line under-indented for visual indent
    E251 unexpected spaces around keyword / parameter equals
    E203 whitespace before ','
  • lib/cartopy/mpl/scalebar.py, line 367 - E128 continuation line under-indented for visual indent
    E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/mpl/scalebar.py, line 368 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 369 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 370 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 371 - E303 too many blank lines (3)
  • lib/cartopy/mpl/scalebar.py, line 373 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 377 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 378 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 379 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 380 - E303 too many blank lines (3)
  • lib/cartopy/mpl/scalebar.py, line 381 - W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 383 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 408 - E128 continuation line under-indented for visual indent
    E265 block comment should start with '# '
    E501 line too long (100 > 79 characters)
  • lib/cartopy/mpl/scalebar.py, line 409 - E124 closing bracket does not match visual indentation
  • lib/cartopy/mpl/scalebar.py, line 410 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 411 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 412 - E303 too many blank lines (2)
  • lib/cartopy/mpl/scalebar.py, line 414 - E265 block comment should start with '# '
  • lib/cartopy/mpl/scalebar.py, line 415 - E265 block comment should start with '# '
    W291 trailing whitespace
  • lib/cartopy/mpl/scalebar.py, line 418 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 419 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 420 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 421 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 422 - E303 too many blank lines (4)
  • lib/cartopy/mpl/scalebar.py, line 423 - W293 blank line contains whitespace
  • lib/cartopy/mpl/scalebar.py, line 424 - F821 undefined name '_add_numeric_scale_bar'
    E501 line too long (86 > 79 characters)
    W292 no newline at end of file
  • lib/cartopy/tests/mpl/test_gridliner.py, line 368 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 369 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 370 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 372 - E303 too many blank lines (4)
  • lib/cartopy/tests/mpl/test_gridliner.py, line 373 - F841 local variable 'fig' is assigned to but never used
  • lib/cartopy/tests/mpl/test_gridliner.py, line 381 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 383 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 385 - E722 do not use bare 'except'
  • lib/cartopy/tests/mpl/test_gridliner.py, line 387 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 388 - E201 whitespace after '('
    E712 comparison to True should be 'if cond is True:' or 'if cond:'
    E225 missing whitespace around operator
  • lib/cartopy/tests/mpl/test_gridliner.py, line 389 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 390 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 393 - E303 too many blank lines (4)
  • lib/cartopy/tests/mpl/test_gridliner.py, line 394 - F841 local variable 'fig' is assigned to but never used
  • lib/cartopy/tests/mpl/test_gridliner.py, line 401 - E501 line too long (84 > 79 characters)
    W291 trailing whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 402 - W291 trailing whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 404 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 406 - E722 do not use bare 'except'
  • lib/cartopy/tests/mpl/test_gridliner.py, line 408 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 409 - E201 whitespace after '('
    E712 comparison to True should be 'if cond is True:' or 'if cond:'
    E225 missing whitespace around operator
  • lib/cartopy/tests/mpl/test_gridliner.py, line 410 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 411 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 413 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 414 - E303 too many blank lines (4)
  • lib/cartopy/tests/mpl/test_gridliner.py, line 415 - F841 local variable 'fig' is assigned to but never used
  • lib/cartopy/tests/mpl/test_gridliner.py, line 423 - E128 continuation line under-indented for visual indent
  • lib/cartopy/tests/mpl/test_gridliner.py, line 424 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 426 - E128 continuation line under-indented for visual indent
  • lib/cartopy/tests/mpl/test_gridliner.py, line 427 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 429 - E722 do not use bare 'except'
  • lib/cartopy/tests/mpl/test_gridliner.py, line 431 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 432 - E201 whitespace after '('
    E712 comparison to True should be 'if cond is True:' or 'if cond:'
    E225 missing whitespace around operator
  • lib/cartopy/tests/mpl/test_gridliner.py, line 433 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 434 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_gridliner.py, line 438 - W391 blank line at end of file
    W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 7 - F401 'unittest.mock' imported but unused
  • lib/cartopy/tests/mpl/test_scalebar.py, line 9 - F401 'matplotlib.testing.decorators.cleanup' imported but unused
  • lib/cartopy/tests/mpl/test_scalebar.py, line 10 - F401 'matplotlib.path as mpath' imported but unused
  • lib/cartopy/tests/mpl/test_scalebar.py, line 12 - F401 'numpy as np' imported but unused
  • lib/cartopy/tests/mpl/test_scalebar.py, line 13 - F401 'pytest' imported but unused
  • lib/cartopy/tests/mpl/test_scalebar.py, line 26 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 28 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 30 - W293 blank line contains whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 32 - F821 undefined name 'projection'
  • lib/cartopy/tests/mpl/test_scalebar.py, line 33 - W291 trailing whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 34 - W291 trailing whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 36 - W291 trailing whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 38 - W291 trailing whitespace
  • lib/cartopy/tests/mpl/test_scalebar.py, line 39 - E127 continuation line over-indented for visual indent
  • lib/cartopy/tests/mpl/test_scalebar.py, line 40 - E127 continuation line over-indented for visual indent
  • lib/cartopy/tests/mpl/test_scalebar.py, line 41 - E127 continuation line over-indented for visual indent
    E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/tests/mpl/test_scalebar.py, line 42 - E127 continuation line over-indented for visual indent
    E251 unexpected spaces around keyword / parameter equals
  • lib/cartopy/tests/mpl/test_scalebar.py, line 43 - W391 blank line at end of file

@PhilipeRLeal
Copy link
Author

I state that I have now signed the Contributor's Licence Agreement (CLA) document.

lib/cartopy/tests/mpl/test_gridliner.py Outdated Show resolved Hide resolved
lib/cartopy/tests/mpl/test_gridliner.py Outdated Show resolved Hide resolved
lib/cartopy/tests/mpl/test_gridliner.py Outdated Show resolved Hide resolved
lib/cartopy/tests/mpl/test_gridliner.py Outdated Show resolved Hide resolved
lib/cartopy/tests/mpl/test_gridliner.py Outdated Show resolved Hide resolved
lib/cartopy/tests/mpl/test_scalebar.py Outdated Show resolved Hide resolved
lib/cartopy/tests/mpl/test_scalebar.py Outdated Show resolved Hide resolved
lib/cartopy/tests/mpl/test_scalebar.py Outdated Show resolved Hide resolved
lib/cartopy/tests/mpl/test_scalebar.py Outdated Show resolved Hide resolved
lib/cartopy/tests/mpl/test_scalebar.py Outdated Show resolved Hide resolved
@greglucas
Copy link
Contributor

Thanks for the PR @PhilipeRLeal!

There are a lot of extraneous changes here to what you're trying to accomplish which makes it hard to review (i.e. linting changes in unrelated files). It looks like there are two things you're trying to put in, a new formatter and a new scalebar? I'd suggest making these two separate smaller PRs as I think they are two distinct features.

Can you rebase and squash into one or two meaningful commits to make the review easier?

You have two tests failing, one license file header and one in the new test you added test_scalebar. See here for those failures: https://travis-ci.org/github/SciTools/cartopy/jobs/750254210

The SciTools CLA checker will automatically get updated when someone has the time to review your submitted CLA and they'll automatically remove it I think.

@PhilipeRLeal
Copy link
Author

rebase

Dear GregLucas, thank you for your suggestions.

This is my first commit to a open source library as cartopy. I still don't know what "rebase" and "squash" mean.

By any chance, "rebase" would be changing the pull request's Title, or hash code (i.e.: #1693)? If so, how can I do it?
The same question for "squash".

Nevertheless, you are right about the things I am trying to put in this pull request. There are two changes that I am proposing.

First, I am trying to add a new customization option for the gridlines. This problem is presented in a comment from the stackoverflow (see here). At the current time, cartopy only supports a fixed set of geographical units for the xticklabels and yticklabels (i.e.: "W" for west coordinates, "E" for east coordinates, "S" for south coordinates, "N" for north coordinates), with no easy way to change them to a user's defined version. Also, there is no easy way to convert the decimal symbol of the coordinates (i.e.: dot "."). For users like me who come from Latin countries, there is a great demand for latin symbols, therefore, instead of using [W,E,S,N and dot"."], one should use the following respectively [O, L, S, N and ","].

Here is a relation of the provided symbols:

O (from Oeste) == West
L (from Leste) == East
N (from Norte) == North
S (from Sul) == South

I state here that all prior symbols [W,E,S,N and dot"."] have been kept as they were (in international format). Therefore, no changes have been made to the common cartopy's gridline usage. This new Pull request only allows the user to easily change those symbols into any user's defined string/symbol.

---------------------------------------------------------------------------------------------------------------

Lastly, I am also proposing a method to draw a scalebar to cartopy's geoaxes. This addition would be directly callable from the geoaxes, and it should be capable of evaluating metric distances (i.e.: meters and km units) in axesTransAxes units.

Prior to cartopy's development, the mpl.basemap had something similar, which allowed easy evaluation and plotting of a scalebar into one's geographical Map. Nevertheless, despite continuous development in cartopy's, this functionality has not been formally proposed.

This scalebar method should also be prone to user's modifications as, for example, setting the decimal separator and unit symbology (i.g.: "km", "mi", etc.).

---------------------------------------------------------------------------------------------------------------

Both new additions have been tested, and are currently running in my computer. Nevertheless, I use Windows, and therefore, I can't properly create a build for the package prior a commit due to GEOS interface. That is one of the main issues that I am struggling with in this pull request.

I believe that this new pull request can truly help Python's community, specially cartopy's.

I put myself at your disposal, and I hope to hear from you soon.

Sincerely,

Philipe Riskalla Leal

PhilipeRLeal pushed a commit to PhilipeRLeal/cartopy that referenced this pull request Dec 21, 2020
…onalities here provided. The prior developers branch had several commits which were aggregated into

this single 1st commit.

Add a warning and comments

This is the commit that antecedes all added new commits in respect to the pull request number SciTools#1693 from: SciTools#1693
@SciTools-assistant SciTools-assistant removed the Blocked: CLA needed See https://scitools.org.uk. Submit the form at: https://scitools.org.uk/cla/v4/form label Dec 21, 2020
@greglucas
Copy link
Contributor

Welcome to the open source community :)

For rebasing and squashing I was referring specifically to git (not GitHub). So on the command line (or with some IDEs maybe through an interface) git rebase -i master when you're on your branch. However, I just noticed that you're on your own master branch, so you would want to checkout a new branch locally first: git checkout -b scalebar, then start working on your rebase onto the other remote master branch.

The whole reason for that is right now I see 97 commits and 100+ files changed, so git needs to know what it is merging against to properly see new vs old commits.

The reason for requesting two separate PRs for this work is that they are distinct entities and maybe one will be accepted and another not, or one needs lots of changes but the other doesn't. It is just easier to work on smaller chunks at a time.

@stickler-ci
Copy link

Could not review pull request. It may be too large, or contain no reviewable changes.

PhilipeRLeal pushed a commit to PhilipeRLeal/cartopy that referenced this pull request Dec 22, 2020
…onalities here provided. The prior developers branch had several commits which were aggregated into

this single 1st commit.

Add a warning and comments

This is the commit that antecedes all added new commits in respect to the pull request number SciTools#1693 from: SciTools#1693
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants