def set_dirty_flag(self):
        @self._auto_deferred_update_operation
        def operation(con):
            sources = set()
            for source in self.sources:
                sources.add(self.build_state.to_source_filename(source))

            if not sources:
                return

            cur = con.cursor()
            cur.executemany('''
                insert or replace into dirty_sources (source) values (?)
            ''', [(x,) for x in sources])
            cur.close()

            reporter.report_dirty_flag(True)
Given a list of artifacts this will mark all of their sources
dataset/ETHPy150Open lektor/lektor/lektor/builder.py/Artifact.set_dirty_flag