diff --git a/.flake8 b/.flake8 index 614267f..ae33f46 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,5 @@ [flake8] exclude=.venv,.git,.nox,.tox,dist,doc,*lib/python*,*egg,build # E123, E125 and W503 are invalid per PEP-8; OpenStack's H rules don't apply -# TODO: drop W504 once the scripts are adjusted to suit it -ignore = E123,E125,H,W503,W504 +ignore = E123,E125,H,W503 show-source = True diff --git a/yaml2ical/cli.py b/yaml2ical/cli.py index 6b45c82..e93e996 100644 --- a/yaml2ical/cli.py +++ b/yaml2ical/cli.py @@ -66,8 +66,9 @@ publishing changes to online meeting schedules. # parse arguments: args = parser.parse_args() - if ((args.index_template and not args.index_output) or - (args.index_output and not args.index_template)): + if ( + (args.index_template and not args.index_output) + or (args.index_output and not args.index_template)): parser.error("You need to provide both -t and " "-w if you want to output an index.") if args.ical_dir and (args.calname or args.caldescription): diff --git a/yaml2ical/meeting.py b/yaml2ical/meeting.py index db5a8e2..bae80f9 100644 --- a/yaml2ical/meeting.py +++ b/yaml2ical/meeting.py @@ -129,8 +129,8 @@ class Schedule(object): # deal with meetings that start on day1 and end on day2. self.meeting_start = datetime.datetime.combine(DATES[self.day], self.time.time()) - self.meeting_end = (self.meeting_start + - datetime.timedelta(minutes=self.duration)) + self.meeting_end = (self.meeting_start + + datetime.timedelta(minutes=self.duration)) if self.day == 'Sunday' and self.meeting_end.strftime("%a") == 'Mon': self.meeting_start = self.meeting_start - ONE_WEEK self.meeting_end = self.meeting_end - ONE_WEEK @@ -174,10 +174,10 @@ class Schedule(object): # NOTE(tonyb): .meeting_start also includes the day of the week. So no # need to check .day explictly - return ((self.irc == other.irc) and - ((self.meeting_start < other.meeting_end) and - (other.meeting_start < self.meeting_end)) and - _non_weekly_conflict_detection(self, other)) + return ((self.irc == other.irc) + and ((self.meeting_start < other.meeting_end) + and (other.meeting_start < self.meeting_end)) + and _non_weekly_conflict_detection(self, other)) class Meeting(object): @@ -272,8 +272,8 @@ def load_meetings(yaml_source): if os.path.splitext(f)[1] == '.yaml': yaml_file = os.path.join(root, f) meetings.append(Meeting.fromfile(yaml_file)) - elif (os.path.isfile(yaml_source) and - os.path.splitext(yaml_source)[1] == '.yaml'): + elif (os.path.isfile(yaml_source) + and os.path.splitext(yaml_source)[1] == '.yaml'): meetings.append(Meeting.fromfile(yaml_source)) elif isinstance(yaml_source, str): return [Meeting.fromstring(yaml_source)]